[devmon 1.1.8] improve --exec-on-unmount for mounted during startup

[devmon 1.1.8] unset %d %l for --exec-on-unmount #56

This change will make --exec-on-unmount commands run for devices mounted
automatically during devmon startup (but still not for devices mounted before
devmon was started)..
This commit is contained in:
IgnorantGuru 2015-04-26 10:48:03 -06:00
parent e290caa7d9
commit 59fecbc965
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,8 @@
0.4.3+
udevil.conf use nonempty option for exfat #52
[devmon 1.1.8] fix no error popup on --unmount-removable #42
[devmon 1.1.8] improve --exec-on-unmount for mounted during startup
[devmon 1.1.8] unset %d %l for --exec-on-unmount #56
0.4.3 2013-12-09:
fix default udevil.conf allowed_options missing fmask=0133 #35
0.4.2 2013-12-04:

View File

@ -568,6 +568,13 @@ mountdev() # $1=device [$2=label] [$3=devtype or fstype]
# no filesystem reported but successful mount
echo "$mntmsg"
fi
# set devtag for recognizing mounted by devmon
devpath="$1"
devtag="${devpath#/dev/}"
devtag="${devtag//-/_}"
eval devmounted${devtag}=1
echo "$umsg"
if [ "$point" = " " ]; then
# pmount doesn't output the mount point - get it now
@ -1167,6 +1174,7 @@ while ps -p $COPROC_PID &>/dev/null; do
if (( execoux != 0 )); then
if ( ! ignoredevice "$devpath" ) && \
( ! ignorelabel "$label" ); then
unset lb point
dv="$devpath"
execcommands "exec on unmount" "${execou[@]}"
fi