mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
export
This commit is contained in:
parent
a2bc696f4d
commit
334d80d579
2 changed files with 5 additions and 4 deletions
|
@ -216,7 +216,7 @@ elif [ "$1" = remove ]; then
|
||||||
# this script, unmount the filesystem.
|
# this script, unmount the filesystem.
|
||||||
if in_list "$mountpoint" "$MOUNTPOINTS"; then
|
if in_list "$mountpoint" "$MOUNTPOINTS"; then
|
||||||
# Run hook scripts; ignore errors.
|
# Run hook scripts; ignore errors.
|
||||||
export UM_DEVICE="$DEVNAME"
|
export UM_DEVICE="/$DEVNAME"
|
||||||
export UM_MOUNTPOINT="$mountpoint"
|
export UM_MOUNTPOINT="$mountpoint"
|
||||||
export UM_FILESYSTEM="$fstype"
|
export UM_FILESYSTEM="$fstype"
|
||||||
log info "executing command: run-parts /etc/usbmount/umount.d"
|
log info "executing command: run-parts /etc/usbmount/umount.d"
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
# VERBOSE=yes
|
# VERBOSE=yes
|
||||||
|
|
||||||
logger -t "usbmount - usb_lib (70-usb-library)" "UM_MOUNTPOINT is: $UM_MOUNTPOINT"
|
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:
|
# 2022-06-16 better security thanks to @tim-moody and @jvonau:
|
||||||
# https://github.com/iiab/iiab/pull/3254
|
# 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)
|
#BOOTFW_DEV=$(findmnt -no source /boot/firmware)
|
||||||
|
|
||||||
# Verbose logging to illuminate occasional boot bugginess:
|
# 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 "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)" "ROOT_DEV is: $ROOT_DEV"
|
||||||
#logger -t "usb_lib (70-usb-library)" "BOOT_DEV is: $BOOT_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"
|
#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"
|
logger -t "usbmount - usb_lib (70-usb-library)" "Skipping $UM_MOUNTPOINT containing /library"
|
||||||
exit 1
|
exit 1
|
||||||
#elif [ "$UM_DEV" == "$ROOT_DEV" ]; then
|
#elif [ "$UM_DEV" == "$ROOT_DEV" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue