aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile2
-rw-r--r--src/usr/libexec/myautomount/myautomount-initialize.sh10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 88d5ddd..ac6bc46 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -14,7 +14,7 @@
# build-devuan: txt2man, bgscripts-core
APPNAME = myautomount
-APPVERSION = 0.0.1
+APPVERSION = 0.0.2
SRCDIR = $(CURDIR)
prefix = /usr
SYSCONFDIR = $(DESTDIR)/etc
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