aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-10-25 15:36:11 -0400
committerB. Stack <bgstack15@gmail.com>2021-10-27 08:39:35 -0400
commit67296c2db2ea0def6925304ef5fe23320da9bd21 (patch)
treebcd5877607140160098ecaf97617773f9e9ddb17 /src/usr
parentfix for devuan (diff)
downloadmyautomount-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')
-rw-r--r--src/usr/libexec/myautomount/myautomount-initialize.sh10
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`.
:
bgstack15