diff options
author | Daniel Baumann <daniel@debian.org> | 2007-11-10 18:39:49 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2007-11-10 18:39:49 +0100 |
commit | cfbadf00dc074883f7c09c02bea786d42158f897 (patch) | |
tree | 3bf6760140cc4af0264925a1d865a7025392692d /helpers/lh_chroot_sysfs | |
parent | b4b0384b619efe64cbae0ca1258730d60af33afe (diff) | |
download | vyos-live-build-cfbadf00dc074883f7c09c02bea786d42158f897.tar.gz vyos-live-build-cfbadf00dc074883f7c09c02bea786d42158f897.zip |
Adding option to allow building in fakeroot/fakechroot environment, thanks to An-Cheng Huang <ancheng@vyatta.com>.
Diffstat (limited to 'helpers/lh_chroot_sysfs')
-rwxr-xr-x | helpers/lh_chroot_sysfs | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs index f9d1f413f..fef710dd9 100755 --- a/helpers/lh_chroot_sysfs +++ b/helpers/lh_chroot_sysfs @@ -52,11 +52,17 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Create mountpoint - mkdir -p chroot/sys - - # Mounting /sys - ${LH_ROOT_COMMAND} mount sysfs-live -t sysfs chroot/sys + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + # Create mountpoint + mkdir -p chroot/sys + + # Mounting /sys + ${LH_ROOT_COMMAND} mount sysfs-live -t sysfs chroot/sys + else + rm -rf chroot/sys + ln -s /sys chroot/ + fi # Creating stage file Create_stagefile .stage/chroot_sysfs @@ -69,9 +75,15 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Unmounting /sys - #fuser -km chroot/sys - ${LH_ROOT_COMMAND} umount chroot/sys > /dev/null 2>&1 + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + # Unmounting /sys + #fuser -km chroot/sys + ${LH_ROOT_COMMAND} umount chroot/sys > /dev/null 2>&1 + else + rm -rf chroot/sys + mkdir -p chroot/sys + fi # Removing stage file rm -f .stage/chroot_sysfs |