/usr/share/ltsp/plugins/ltsp-build-client/Gentoo/020-rootpath is in ltsp-server 5.4.2-6+deb7u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | case "$MODE" in
commandline)
add_option "purge-chroot" "`eval_gettext "purge existing LTSP chroot if present"`" "advanced" "false"
;;
configure)
if [ "true" = "$option_purge_chroot_value" ]; then
PURGE_CHROOT="true"
fi
;;
before-install)
export ROOT=$BASE/$CHROOT
if [ -d $ROOT ] ; then
if [ "true" = "$PURGE_CHROOT" ]; then
# first check if no bind mounts are still active
if [ "$(cat /proc/mounts | awk '{print $2}' | grep -c "^$ROOT")" -ne "0" ]; then
echo "NOTE: Some bind mounts are still mounted within $ROOT, unmount them before trying again. Exiting"
exit 0
fi
# wipe it out, so we can try again
rm --force --recursive --one-file-system "$ROOT"
else
echo "NOTE: Root directory $ROOT already exists, this will lead to problems, please remove it before trying again. Exiting."
exit 0
fi
fi
mkdir -p "$ROOT"
;;
esac
|