summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-11-11 23:05:55 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:29 +0100
commit1ef63a83da236e6c949c27140cfa0ee6fc652f17 (patch)
treec94bc720d5eedf6fb630bf6d2f91af3b259f26b5 /helpers
parent66e6a4c14a6a125356707a669fef6e016bc0f6ff (diff)
downloadlive-build-1ef63a83da236e6c949c27140cfa0ee6fc652f17.zip
live-build-1ef63a83da236e6c949c27140cfa0ee6fc652f17.tar.gz
Adding some more fakeroot related fixes from An-Cheng Huang <ancheng@vyatta.com>.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_chroot_devpts18
-rwxr-xr-xhelpers/lh_chroot_proc6
2 files changed, 15 insertions, 9 deletions
diff --git a/helpers/lh_chroot_devpts b/helpers/lh_chroot_devpts
index 0024fb9..07fec4d 100755
--- a/helpers/lh_chroot_devpts
+++ b/helpers/lh_chroot_devpts
@@ -52,11 +52,14 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- # Creating mountpoint
- mkdir -p chroot/dev/pts
+ if [ "${LH_USE_FAKEROOT}" != "enabled" ]
+ then
+ # Creating mountpoint
+ mkdir -p chroot/dev/pts
- # Mounting /dev/pts
- ${LH_ROOT_COMMAND} mount devpts-live -t devpts chroot/dev/pts
+ # Mounting /dev/pts
+ ${LH_ROOT_COMMAND} mount devpts-live -t devpts chroot/dev/pts
+ fi
# Creating stage file
Create_stagefile .stage/chroot_devpts
@@ -70,9 +73,12 @@ case "${1}" in
Create_lockfile .lock
# Unmounting /dev/pts
- if [ -e chroot/dev/pts/0 ]
+ if [ "${LH_USE_FAKEROOT}" != "enabled" ]
then
- ${LH_ROOT_COMMAND} umount chroot/dev/pts
+ if [ -e chroot/dev/pts/0 ]
+ then
+ ${LH_ROOT_COMMAND} umount chroot/dev/pts
+ fi
fi
# Removing stage file
diff --git a/helpers/lh_chroot_proc b/helpers/lh_chroot_proc
index 378703a..c0e1a76 100755
--- a/helpers/lh_chroot_proc
+++ b/helpers/lh_chroot_proc
@@ -59,13 +59,13 @@ case "${1}" in
# Mounting /proc
${LH_ROOT_COMMAND} mount proc-live -t proc chroot/proc
-
- # Creating stage file
- Create_stagefile .stage/chroot_proc
else
rm -rf chroot/proc
ln -s /proc chroot/
fi
+
+ # Creating stage file
+ Create_stagefile .stage/chroot_proc
;;
remove)