1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00
This commit is contained in:
Jerry Vonau 2025-02-15 15:19:33 -06:00
parent a2bc696f4d
commit 334d80d579
2 changed files with 5 additions and 4 deletions

View file

@ -216,7 +216,7 @@ elif [ "$1" = remove ]; then
# this script, unmount the filesystem.
if in_list "$mountpoint" "$MOUNTPOINTS"; then
# Run hook scripts; ignore errors.
export UM_DEVICE="$DEVNAME"
export UM_DEVICE="/$DEVNAME"
export UM_MOUNTPOINT="$mountpoint"
export UM_FILESYSTEM="$fstype"
log info "executing command: run-parts /etc/usbmount/umount.d"

View file

@ -23,7 +23,8 @@
# VERBOSE=yes
logger -t "usbmount - usb_lib (70-usb-library)" "UM_MOUNTPOINT is: $UM_MOUNTPOINT"
UM_DEV=$(findmnt -no source $UM_MOUNTPOINT)
logger -t "usbmount - usb_lib (70-usb-library)" "UM_DEVICE is: $UM_DEVICE"
#UM_DEV=$(findmnt -no source $UM_MOUNTPOINT)
# 2022-06-16 better security thanks to @tim-moody and @jvonau:
# https://github.com/iiab/iiab/pull/3254
@ -34,13 +35,13 @@ LIB_DEV=$(findmnt -no source /library | cut -d '[' -f 1)
#BOOTFW_DEV=$(findmnt -no source /boot/firmware)
# Verbose logging to illuminate occasional boot bugginess:
logger -t "usbmount - usb_lib (70-usb-library)" "UM_DEV is: $UM_DEV"
logger -t "usbmount - usb_lib (70-usb-library)" "LIB_DEV is: $LIB_DEV"
#logger -t "usb_lib (70-usb-library)" "ROOT_DEV is: $ROOT_DEV"
#logger -t "usb_lib (70-usb-library)" "BOOT_DEV is: $BOOT_DEV"
#logger -t "usb_lib (70-usb-library)" "BOOTFW_DEV is: $BOOTFW_DEV"
if [ "$UM_DEV" == "$LIB_DEV" ]; then
#if [ "$UM_DEV" == "$LIB_DEV" ]; then
if [ "$UM_DEVICE" == "$LIB_DEV" ]; then
logger -t "usbmount - usb_lib (70-usb-library)" "Skipping $UM_MOUNTPOINT containing /library"
exit 1
#elif [ "$UM_DEV" == "$ROOT_DEV" ]; then