aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--myautomount.spec4
-rw-r--r--src/usr/libexec/myautomount/myautomount-initialize.sh3
2 files changed, 4 insertions, 3 deletions
diff --git a/myautomount.spec b/myautomount.spec
index 2c00c48..d3e49dd 100644
--- a/myautomount.spec
+++ b/myautomount.spec
@@ -16,7 +16,7 @@
%global use_master 0
%if !0%{?use_master}
%global git_date 20200929
-%global git_commit cdfc069c4181e83b62b411ecfcdcc936f65ea87e
+%global git_commit 8b9bc25cc615f7e8ba86ce51d2dd83220a4e084f
%{?git_commit:%global git_commit_hash %(c=%{git_commit}; echo ${c:0:7})}
%else
%endif
@@ -61,7 +61,7 @@ export srcdir="$( find . -type d -name 'src' -printf '%%P' )"
%install
export srcdir="$( find . -type d -name 'src' -printf '%%P' )"
%make_install -C "${srcdir}"
-DESTDIR=%{buildroot} %{__make} -C "${srcdir}" initialize
+MYA_SKIP_RESTART=1 DESTDIR=%{buildroot} %{__make} -C "${srcdir}" initialize
exit 0
%clean
diff --git a/src/usr/libexec/myautomount/myautomount-initialize.sh b/src/usr/libexec/myautomount/myautomount-initialize.sh
index ea87759..e1cc6a8 100644
--- a/src/usr/libexec/myautomount/myautomount-initialize.sh
+++ b/src/usr/libexec/myautomount/myautomount-initialize.sh
@@ -1,6 +1,7 @@
#!/bin/sh
# SPDX-License-Identifier: BSD-2-Clause
# Only needs to be run once. This is more for reference than for using. The package should handle these tasks.
+# MYA_SKIP_RESTART is for when you are building a package
fail() {
echo "${@}" 1>&2
@@ -18,7 +19,7 @@ setupSystem() {
{ touch "${MYA_PREFIX}${AUTOMOUNT_DIR_FILE}" && echo "${AUTOMOUNT_BROWSEDIR} ${AUTOMOUNT_FILE} --timeout=5 " > "${MYA_PREFIX}${AUTOMOUNT_DIR_FILE}" ; } || fail "Could not setup autofs rules! Check if this is being run as root?"
_needrestart=1
}
- test ${_needrestart} -eq 1 && eval "service autofs restart"
+ test ${_needrestart} -eq 1 && test -n "${MYA_SKIP_RESTART}" eval "service autofs restart"
}
. ${MYA_PREFIX}/etc/myautomount.conf
bgstack15