Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] UT2003's updater segfaults

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Mads Laursen <dossen+sgl AT daimi.au.dk>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] UT2003's updater segfaults
  • Date: Sat, 30 Nov 2002 14:03:16 +0100

On 30/11/02 13.55, Mads Laursen wrote:
<snip>
> - enter the directory via chroot, see the attached script for commands
> and stuff to remember (getting the directories mounted over helps
> the system alot).
<more snip>

The script I promissed.

Note: This is NOT a secure chroot, there's much too much stuff in
there (a compiler toolchain, just for starters).

/dossen

#!/bin/bash
ROOT=$1;

mount --bind /proc $ROOT/proc
mount --bind /devices $ROOT/devices
mount --bind /dev $ROOT/dev
mount --bind /var/spool/sorcery/ $ROOT/var/spool/sorcery/
mount --bind /root $ROOT/root
mount --bind /home $ROOT/home

chroot $ROOT /usr/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ '
PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login

umount $ROOT/proc
umount $ROOT/devices
umount $ROOT/dev
umount $ROOT/var/spool/sorcery/
umount $ROOT/root
umount $ROOT/home




Archive powered by MHonArc 2.6.24.

Top of Page