aboutsummaryrefslogtreecommitdiff
path: root/src/usr/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/libexec')
-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