From 67296c2db2ea0def6925304ef5fe23320da9bd21 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Mon, 25 Oct 2021 15:36:11 -0400 Subject: v0.0.2 improve autofs flags to handle ext4 mounts --- NEWS | 5 +++++ debian/changelog | 6 ++++++ debian/myautomount.dsc | 4 ++-- myautomount.spec | 7 +++++-- src/Makefile | 2 +- src/usr/libexec/myautomount/myautomount-initialize.sh | 10 ++++++++-- 6 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 NEWS diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..5da1b48 --- /dev/null +++ b/NEWS @@ -0,0 +1,5 @@ +myautomount 0.0.2 +================= +2021-10-25 + +* Improve /etc/autofs.myautomount to support ext4 mount flags, so automounting ext4 works as well. diff --git a/debian/changelog b/debian/changelog index 154e96a..87bd9dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +myautomount (0.0.2-1) obs; urgency=low + + * New version. + + -- B. Stack Mon, 25 Oct 2021 15:31:00 -0400 + myautomount (0.0.1-1) obs; urgency=low * Initial release. Closes: packages-want#9999 diff --git a/debian/myautomount.dsc b/debian/myautomount.dsc index 6e133ae..423542f 100644 --- a/debian/myautomount.dsc +++ b/debian/myautomount.dsc @@ -2,8 +2,8 @@ Format: 3.0 (quilt) Source: myautomount Binary: myautomount Architecture: all -Version: 0.0.1-1 -Maintainer: Ben Stack +Version: 0.0.2-1 +Maintainer: B. Stack Homepage: https://bgstack15.wordpress.com/ Standards-Version: 4.5.0 Build-Depends: debhelper-compat (= 12), bgscripts-core, txt2man diff --git a/myautomount.spec b/myautomount.spec index af4edd4..c324677 100644 --- a/myautomount.spec +++ b/myautomount.spec @@ -14,13 +14,13 @@ # Dependencies: %global use_local 1 -%global use_commit 1 +%global use_commit 0 %define date %(date +%%Y%%m%%d) %if 0%{?use_commit} %global git_commit 0d5f8b7657527eab8380f5aa81ecd072714cf13c %{?git_commit:%global git_commit_hash %(c=%{git_commit}; echo ${c:0:7})} %else -%global git_commit 0.0.1 +%global git_commit 0.0.2 %endif %global releasenum 1 @@ -103,5 +103,8 @@ update-desktop-database 1>/dev/null 2>&1 || : %endif %changelog +* Mon Oct 25 2021 B. Stack - 0.0.2-1 +- New version + * Tue Sep 29 2020 B Stack - 0.0.1-1 - Initial package build 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`. : -- cgit