Small cosmetical changes
This commit is contained in:
parent
10d81b7e5b
commit
74ed7582f9
2 changed files with 15 additions and 11 deletions
|
|
@ -47,7 +47,7 @@ These are the included binaries and utilities:
|
||||||
archivemount` if you have it installed.
|
archivemount` if you have it installed.
|
||||||
Use "--check" to only check if a file is an archive.
|
Use "--check" to only check if a file is an archive.
|
||||||
It returns 0 if it is, 1 otherwise.
|
It returns 0 if it is, 1 otherwise.
|
||||||
- SquashFS tools (squasher):
|
- squasher:
|
||||||
These convenient set of tools allow you to easily create
|
These convenient set of tools allow you to easily create
|
||||||
XZ-compressed SquashFS images from existing folders to save
|
XZ-compressed SquashFS images from existing folders to save
|
||||||
disk space. The resulting folder is still writable since it is
|
disk space. The resulting folder is still writable since it is
|
||||||
|
|
@ -74,7 +74,7 @@ These are the included binaries and utilities:
|
||||||
not exist yet. When the file appears on disk, the
|
not exist yet. When the file appears on disk, the
|
||||||
tool quits and simply returns the filename. This
|
tool quits and simply returns the filename. This
|
||||||
can be used in personal workflows to stall a longer
|
can be used in personal workflows to stall a longer
|
||||||
command that relies on the existence of said file.=
|
command that relies on the existence of said file.
|
||||||
- agenda:
|
- agenda:
|
||||||
Sets up a folder that is backed by a date-based tree
|
Sets up a folder that is backed by a date-based tree
|
||||||
directory structure. Requires an argument for the name
|
directory structure. Requires an argument for the name
|
||||||
|
|
|
||||||
22
squasher
22
squasher
|
|
@ -75,17 +75,17 @@ case "$COMMAND" in
|
||||||
echo "-------------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------------"
|
||||||
|
|
||||||
SERVICE_CONTENT="[Unit]
|
SERVICE_CONTENT="[Unit]
|
||||||
Description=SquashFS Mount for %I
|
Description=SquashFS Mount for %I
|
||||||
After=local-fs.target
|
After=local-fs.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=${BIN_DIR}/squasher mount %I
|
ExecStart=${BIN_DIR}/squasher mount %I
|
||||||
ExecStop=${BIN_DIR}/squasher umount %I
|
ExecStop=${BIN_DIR}/squasher umount %I
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target"
|
WantedBy=multi-user.target"
|
||||||
|
|
||||||
echo "$SERVICE_CONTENT" | sudo tee /etc/systemd/system/squash-mount@.service > /dev/null
|
echo "$SERVICE_CONTENT" | sudo tee /etc/systemd/system/squash-mount@.service > /dev/null
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
|
@ -94,6 +94,7 @@ WantedBy=multi-user.target"
|
||||||
SERVICE_NAME="squash-mount@$ESC_PATH.service"
|
SERVICE_NAME="squash-mount@$ESC_PATH.service"
|
||||||
|
|
||||||
read -p "Enable auto-mount service ($SERVICE_NAME)? [y/N] " yn
|
read -p "Enable auto-mount service ($SERVICE_NAME)? [y/N] " yn
|
||||||
|
|
||||||
if [[ "$yn" =~ ^[Yy]$ ]]; then
|
if [[ "$yn" =~ ^[Yy]$ ]]; then
|
||||||
sudo systemctl enable --now "$SERVICE_NAME"
|
sudo systemctl enable --now "$SERVICE_NAME"
|
||||||
sudo systemctl stop "$SERVICE_NAME"
|
sudo systemctl stop "$SERVICE_NAME"
|
||||||
|
|
@ -112,6 +113,7 @@ WantedBy=multi-user.target"
|
||||||
"$0" umount "$DIR" 2>/dev/null
|
"$0" umount "$DIR" 2>/dev/null
|
||||||
mkdir -p "$OVERLAY_LOWER"
|
mkdir -p "$OVERLAY_LOWER"
|
||||||
sudo mount "${OVERLAY_ROOT}.img" "$OVERLAY_LOWER" -t squashfs -o loop
|
sudo mount "${OVERLAY_ROOT}.img" "$OVERLAY_LOWER" -t squashfs -o loop
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Error: Failed to mount squashfs image." >&2
|
echo "Error: Failed to mount squashfs image." >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -125,6 +127,7 @@ WantedBy=multi-user.target"
|
||||||
sudo umount "$OVERLAY_LOWER" 2>/dev/null
|
sudo umount "$OVERLAY_LOWER" 2>/dev/null
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "SquashFS filesystem is mounted and ready."
|
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."
|
echo "Warning: Filesystem is still mounted. Check for open processes."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "SquashFS filesystem has been unmounted."
|
echo "SquashFS filesystem has been unmounted."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue