Skip to content

Commit

Permalink
bugfix: set trap to clean up after chroot
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraz Siri committed Jan 11, 2010
1 parent 8502418 commit 6e1a320
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/tklpatch-chroot
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ command=$@
mount -t proc proc-chroot $root/proc
mount -t devpts devpts-chroot $root/dev/pts

trap "(umount devpts-chroot && umount proc-chroot) >& /dev/null;" INT TERM EXIT
echo "# chroot execute: $command"
bin=$(which chroot)
$bin $root env -i \
HOME=/root \
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/bin:/usr/sbin \
DEBIAN_FRONTEND=noninteractive \
/bin/sh -c "$command"

umount devpts-chroot
umount proc-chroot

0 comments on commit 6e1a320

Please sign in to comment.