summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/chroot_devpts101
1 files changed, 29 insertions, 72 deletions
diff --git a/scripts/build/chroot_devpts b/scripts/build/chroot_devpts
index 713ff28ae..d917bc4d4 100755
--- a/scripts/build/chroot_devpts
+++ b/scripts/build/chroot_devpts
@@ -29,89 +29,46 @@ Require_stagefile .build/config .build/bootstrap
case "${1}" in
install)
- if [ "${LIVE_IMAGE_TYPE}" = "hdd" ]; then
- Echo_message "Begin mounting /dev..."
+ Echo_message "Begin mounting /dev/pts..."
- # Checking stage file
- Check_stagefile .build/chroot_devpts
+ # Checking stage file
+ Check_stagefile .build/chroot_devpts
- # Checking lock file
- Check_lockfile .lock
+ # Checking lock file
+ Check_lockfile .lock
- # Creating lock file
- Create_lockfile .lock
+ # Creating lock file
+ Create_lockfile .lock
- # Creating mountpoint
- mount --bind /dev chroot/dev || true
- mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
+ # Creating mountpoint
+ mkdir -p chroot/dev/pts
- # Creating stage file
- Create_stagefile .build/chroot_devpts
- else
- Echo_message "Begin mounting /dev/pts..."
+ # Mounting /dev/pts
+ mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
- # Checking stage file
- Check_stagefile .build/chroot_devpts
+ # Creating stage file
+ Create_stagefile .build/chroot_devpts
+ ;;
- # Checking lock file
- Check_lockfile .lock
+ remove)
+ Echo_message "Begin unmounting /dev/pts..."
- # Creating lock file
- Create_lockfile .lock
+ # Checking lock file
+ Check_lockfile .lock
- # Creating mountpoint
- mkdir -p chroot/dev/pts
+ # Creating lock file
+ Create_lockfile .lock
- # Mounting /dev/pts
- mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
+ # Unmounting /dev/pts
+ if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
+ then
+ umount chroot/dev/pts
+ else
+ umount -f chroot/dev/pts > /dev/null 2>&1 || true
+ fi
- # Creating stage file
- Create_stagefile .build/chroot_devpts
- fi
- ;;
-
- remove)
- if [ "${LIVE_IMAGE_TYPE}" = "hdd" ]; then
- Echo_message "Begin unmounting /dev..."
-
- # Checking lock file
- Check_lockfile .lock
-
- # Creating lock file
- Create_lockfile .lock
-
- # Unmounting /dev
- if grep -qs "$(pwd)/chroot/dev" /proc/mounts || Find_files chroot/dev/*
- then
- umount chroot/dev/pts
- umount chroot/dev
- else
- umount -f chroot/dev/pts > /dev/null 2>&1 || true
- umount -f chroot/dev > /dev/null 2>&1 || true
- fi
-
- # Removing stage file
- rm -f .build/chroot_devpts
- else
- Echo_message "Begin unmounting /dev/pts..."
-
- # Checking lock file
- Check_lockfile .lock
-
- # Creating lock file
- Create_lockfile .lock
-
- # Unmounting /dev/pts
- if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
- then
- umount chroot/dev/pts
- else
- umount -f chroot/dev/pts > /dev/null 2>&1 || true
- fi
-
- # Removing stage file
- rm -f .build/chroot_devpts
- fi
+ # Removing stage file
+ rm -f .build/chroot_devpts
;;
*)