From 1e106575d2aec4df427febddbe2b84ddfbc155d5 Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Wed, 12 Dec 2001 10:12:20 +0000 Subject: [PATCH] Set the script_name_sep variable to a safe value if it is not already set (e.g. a failed/skipped mergemaster run during an upgrade). Without this, if script_name_sep was not set in the rc.conf files, local scripts will not be executed on startup or shutdown. PR: misc/32687 Submitted by: Nicholas Paufler (the problem) Sheldon Hearn (the idea behind the fix) Reviewed by: sheldonh MFC after: 1 week --- etc/rc | 3 +++ etc/rc.shutdown | 3 +++ 2 files changed, 6 insertions(+) diff --git a/etc/rc b/etc/rc index 0ffbc4086321..9c17eb69a182 100644 --- a/etc/rc +++ b/etc/rc @@ -813,6 +813,9 @@ case ${local_startup} in *) echo -n 'Local package initialization:' slist="" + if [ -z "${script_name_sep}" ]; then + script_name_sep=" " + fi for dir in ${local_startup}; do if [ -d "${dir}" ]; then for script in ${dir}/*.sh; do diff --git a/etc/rc.shutdown b/etc/rc.shutdown index f6c59c9ae562..6a7ca8acf690 100644 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -103,6 +103,9 @@ case ${local_startup} in ;; *) slist="" + if [ -z "${script_name_sep}" ]; then + script_name_sep=" " + fi for dir in ${local_startup}; do if [ -d "${dir}" ]; then for script in ${dir}/*.sh; do