aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-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