diff options
author | B. Stack <bgstack15@gmail.com> | 2021-10-25 15:36:11 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2021-10-27 08:39:35 -0400 |
commit | 67296c2db2ea0def6925304ef5fe23320da9bd21 (patch) | |
tree | bcd5877607140160098ecaf97617773f9e9ddb17 /src/usr/libexec | |
parent | fix for devuan (diff) | |
download | myautomount-67296c2db2ea0def6925304ef5fe23320da9bd21.tar.gz myautomount-67296c2db2ea0def6925304ef5fe23320da9bd21.tar.bz2 myautomount-67296c2db2ea0def6925304ef5fe23320da9bd21.zip |
v0.0.2 improve autofs flags to handle ext4 mounts
Diffstat (limited to 'src/usr/libexec')
-rw-r--r-- | src/usr/libexec/myautomount/myautomount-initialize.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/libexec/myautomount/myautomount-initialize.sh b/src/usr/libexec/myautomount/myautomount-initialize.sh index 1f7a42b..8d47bdd 100644 --- a/src/usr/libexec/myautomount/myautomount-initialize.sh +++ b/src/usr/libexec/myautomount/myautomount-initialize.sh @@ -12,7 +12,13 @@ setupSystem() { _needrestart=0 mkdir -m0755 -p "${MYA_PREFIX}${AUTOMOUNT_DIR}" || fail "Could not setup autofs rules! Check if this is being run as root?" ! grep -q -e "uid=${AUTOMOUNT_USER}," "${MYA_PREFIX}${AUTOMOUNT_FILE}" 2>/dev/null && { - { touch "${MYA_PREFIX}${AUTOMOUNT_FILE}" && echo "* -fstype=auto,rw,nosuid,uid=${AUTOMOUNT_USER},gid=users :/dev/& " > "${MYA_PREFIX}${AUTOMOUNT_FILE}" ; } || fail "Could not setup autofs rules! Check if this is being run as root?" + { + touch "${MYA_PREFIX}${AUTOMOUNT_FILE}" + echo "# for fat32, ntfs" + echo "* -fstype=auto,noatime,rw,nosuid,uid=${AUTOMOUNT_USER},gid=users :/dev/& " + echo "# for ext4" + echo "* -fstype=auto,noatime,rw,nosuid :/dev/& " + } > "${MYA_PREFIX}${AUTOMOUNT_FILE}" || fail "Could not setup autofs rules! Check if this is being run as root?" _needrestart=1 } ! grep -q -e "${AUTOMOUNT_BROWSEDIR}" "${MYA_PREFIX}${AUTOMOUNT_DIR_FILE}" 2>/dev/null && { @@ -23,7 +29,7 @@ setupSystem() { } export AUTOMOUNT_DAEMON=1 # to suppress the useless error about mktemp: failed to create file -. ${MYA_PREFIX}/etc/myautomount.conf +. ${MYA_PREFIX}/etc/myautomount.conf setupSystem # must enforce exit 0 because otherwise an already-initialized system will end with test ${_needrestart} -eq 1 as false which will break `make`. : |