aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/libexec/myautomount/myautomount-initialize.sh3
1 files changed, 2 insertions, 1 deletions
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