Small cosmetical changes

This commit is contained in:
Sam Hardeman 2026-03-15 19:11:37 +01:00
parent 10d81b7e5b
commit 74ed7582f9
2 changed files with 15 additions and 11 deletions

View file

@ -75,17 +75,17 @@ case "$COMMAND" in
echo "-------------------------------------------------------------------------"
SERVICE_CONTENT="[Unit]
Description=SquashFS Mount for %I
After=local-fs.target
Description=SquashFS Mount for %I
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=${BIN_DIR}/squasher mount %I
ExecStop=${BIN_DIR}/squasher umount %I
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=${BIN_DIR}/squasher mount %I
ExecStop=${BIN_DIR}/squasher umount %I
[Install]
WantedBy=multi-user.target"
[Install]
WantedBy=multi-user.target"
echo "$SERVICE_CONTENT" | sudo tee /etc/systemd/system/squash-mount@.service > /dev/null
sudo systemctl daemon-reload
@ -94,6 +94,7 @@ WantedBy=multi-user.target"
SERVICE_NAME="squash-mount@$ESC_PATH.service"
read -p "Enable auto-mount service ($SERVICE_NAME)? [y/N] " yn
if [[ "$yn" =~ ^[Yy]$ ]]; then
sudo systemctl enable --now "$SERVICE_NAME"
sudo systemctl stop "$SERVICE_NAME"
@ -112,6 +113,7 @@ WantedBy=multi-user.target"
"$0" umount "$DIR" 2>/dev/null
mkdir -p "$OVERLAY_LOWER"
sudo mount "${OVERLAY_ROOT}.img" "$OVERLAY_LOWER" -t squashfs -o loop
if [[ $? -ne 0 ]]; then
echo "Error: Failed to mount squashfs image." >&2
exit 1
@ -125,6 +127,7 @@ WantedBy=multi-user.target"
sudo umount "$OVERLAY_LOWER" 2>/dev/null
exit 1
fi
echo "SquashFS filesystem is mounted and ready."
;;
@ -136,6 +139,7 @@ WantedBy=multi-user.target"
echo "Warning: Filesystem is still mounted. Check for open processes."
exit 1
fi
echo "SquashFS filesystem has been unmounted."
;;