diff options
author | B Stack <bgstack15@gmail.com> | 2020-09-29 22:08:31 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-09-29 22:08:31 -0400 |
commit | 271a0dfcfd2f4f2dd7d9cc0fb9d5a8749cd5d472 (patch) | |
tree | 63f3e472417fd3f2a77624b619e12d7746ef8f42 /src/usr | |
parent | WIP: improve rpm packaging, fix desktop files (diff) | |
download | myautomount-271a0dfcfd2f4f2dd7d9cc0fb9d5a8749cd5d472.tar.gz myautomount-271a0dfcfd2f4f2dd7d9cc0fb9d5a8749cd5d472.tar.bz2 myautomount-271a0dfcfd2f4f2dd7d9cc0fb9d5a8749cd5d472.zip |
add sudo rule
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/bin/myautomountd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/usr/bin/myautomountd b/src/usr/bin/myautomountd index a5d8828..340ce04 100755 --- a/src/usr/bin/myautomountd +++ b/src/usr/bin/myautomountd @@ -119,6 +119,10 @@ createEntry() { trap '__ec=$? ; clean_automount ; trap "" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 ; exit ${__ec} ;' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 mkdir -p "${AUTOMOUNT_BASEDIR}" +# run initialization script as root +$( which sudo 2>/dev/null ) /usr/libexec/myautomount/myautomount-initialize.sh +_response="${?}" ; test ${_response} -ne 0 && exit ${_response} + # MAIN # start udevadm udevadm monitor -u -s block 1> "${AUTOMOUNT_TMPFILE}" & |