noautomount
parent
32f35a745d
commit
77907d4abe
|
|
@ -20,6 +20,18 @@ UNIT="media-$BAS.mount"
|
||||||
MNT="/media/$BAS"
|
MNT="/media/$BAS"
|
||||||
TARGET="/etc/systemd/system/$UNIT"
|
TARGET="/etc/systemd/system/$UNIT"
|
||||||
|
|
||||||
|
|
||||||
|
# exit if noautomount boot parameter is present
|
||||||
|
if cat /proc/cmdline | grep -q noautomount; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# exit if 'automount' boot parameter is missing
|
||||||
|
if ! cat /proc/cmdline | grep -q automount; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$ACTION" = "add" -o "$ACTION" = "change" ]; then
|
if [ "$ACTION" = "add" -o "$ACTION" = "change" ]; then
|
||||||
if [ ! -r "$TARGET" ]; then # skip if exists
|
if [ ! -r "$TARGET" ]; then # skip if exists
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue