3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && .
"${LIVE_BUILD}/scripts/build.sh" || .
/usr
/lib
/live
/build.sh
16 # Setting static variables
17 DESCRIPTION
="$(Echo 'mount /sys/fs/selinux')"
19 USAGE
="${PROGRAM} {install|remove} [--force]"
23 # Reading configuration files
24 Read_conffiles config
/all config
/common config
/bootstrap config
/chroot config
/binary config
/source
27 # Requiring stage file
28 Require_stagefile .build
/config .build
/bootstrap
32 if [ -e /sys
/fs
/selinux
/enforce
] && [ "$(cat /sys/fs/selinux/enforce)" = "1" ]
34 Echo_message
"Begin mounting /sys/fs/selinux..."
37 Check_stagefile .build
/chroot_selinuxfs
46 mkdir
-p chroot
/sys
/fs
/selinux
48 # Mounting /sys/fs/selinux
49 mount selinuxfs-live
-t selinuxfs chroot
/sys
/fs
/selinux
52 Create_stagefile .build
/chroot_selinuxfs
57 Echo_message
"Begin unmounting /sys/fs/selinux..."
65 # Unmounting /sys/fs/selinux
66 if [ -e chroot
/sys
/fs
/selinux
/enforce
]
68 umount chroot
/sys
/fs
/selinux
72 rm -f .build
/chroot_selinux