remove mounts automatically

Also combined all these little mount and cleanup helpers into one
`cleanup` script with flags.
This commit is contained in:
Jarvis Carroll
2025-05-24 00:05:26 +10:00
parent 28de550295
commit 3898aa52be
6 changed files with 108 additions and 84 deletions
+4 -2
View File
@@ -20,7 +20,7 @@ fi
if test -e "$ROOT"
then
echo "Existing installation found at $ROOT, removing."
./destroy_environment
./cleanup
fi
echo "Copying $FRESH to $ROOT."
@@ -28,7 +28,7 @@ cp -r "$FRESH" "$ROOT"
echo "Initializing $ROOT."
./mountpoints
./cleanup add_mounts
# Don't bother creating a new tmpfs. We don't want to leak files in, and we
# don't want to waste more RAM on a second tmpfs. The whole thing is
@@ -38,3 +38,5 @@ chmod 1777 "$ROOT/tmp"
cp -r install_scripts "$ROOT/root"
chroot "$ROOT" /root/install_scripts/user_setup "$@"
./cleanup mounts