From fc6313650f03b2c1bb097d7619478aa1fac6a39c Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 29 Sep 2020 19:55:24 -0400 Subject: WIP: fixing initialize for packaging process --- src/usr/libexec/myautomount/myautomount-initialize.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/usr') 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 -- cgit