From cd911ae68dc83042569c6448d67a39f15779ccd0 Mon Sep 17 00:00:00 2001 From: Stefan Grundmann Date: Thu, 8 Nov 2018 08:50:20 +0000 Subject: [PATCH 1/2] FreeBSD rc scripts: echo start/stop actions behave like all the other rc scripts --- packaging/rc.d/albatross_console | 1 + packaging/rc.d/albatross_daemon | 1 + packaging/rc.d/albatross_influx | 1 + packaging/rc.d/albatross_log | 1 + packaging/rc.d/albatross_stat | 1 + packaging/rc.d/albatross_tls | 1 + packaging/rc.d/albatross_x | 4 ++++ 7 files changed, 10 insertions(+) diff --git a/packaging/rc.d/albatross_console b/packaging/rc.d/albatross_console index 21eeff5..597174c 100755 --- a/packaging/rc.d/albatross_console +++ b/packaging/rc.d/albatross_console @@ -32,6 +32,7 @@ pidfile="/var/run/albatross_console.pid" procname="/usr/local/libexec/albatross/vmmd_console" albatross_console_start () { + echo "Starting ${name}." /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_console_user}" \ "${procname}" ${albatross_console_flags} } diff --git a/packaging/rc.d/albatross_daemon b/packaging/rc.d/albatross_daemon index 44d4f53..f1a85e0 100755 --- a/packaging/rc.d/albatross_daemon +++ b/packaging/rc.d/albatross_daemon @@ -67,6 +67,7 @@ albatross_daemon_precmd() { } albatross_daemon_start () { + echo "Starting ${name}." /usr/sbin/daemon -S -p "${pidfile}" "${procname}" \ ${albatross_daemon_flags} } diff --git a/packaging/rc.d/albatross_influx b/packaging/rc.d/albatross_influx index eba847a..d94fdd5 100755 --- a/packaging/rc.d/albatross_influx +++ b/packaging/rc.d/albatross_influx @@ -62,6 +62,7 @@ albatross_influx_precmd() { } albatross_influx_start () { + echo "Starting ${name}." /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_influx_user}" \ "${procname}" ${albatross_influx_flags} } diff --git a/packaging/rc.d/albatross_log b/packaging/rc.d/albatross_log index b8d8eb3..f090831 100755 --- a/packaging/rc.d/albatross_log +++ b/packaging/rc.d/albatross_log @@ -40,6 +40,7 @@ albatross_log_precmd () { } albatross_log_start () { + echo "Starting ${name}." /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_log_user}" \ "${procname}" ${albatross_log_flags} } diff --git a/packaging/rc.d/albatross_stat b/packaging/rc.d/albatross_stat index c460a87..8c2bfb3 100755 --- a/packaging/rc.d/albatross_stat +++ b/packaging/rc.d/albatross_stat @@ -32,6 +32,7 @@ pidfile="/var/run/albatross_stat.pid" procname="/usr/local/libexec/albatross/vmmd_stats" albatross_stat_start () { + echo "Starting ${name}." /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_stat_user}" \ "${procname}" ${albatross_stat_flags} } diff --git a/packaging/rc.d/albatross_tls b/packaging/rc.d/albatross_tls index e736089..9aa132c 100755 --- a/packaging/rc.d/albatross_tls +++ b/packaging/rc.d/albatross_tls @@ -62,6 +62,7 @@ albatross_tls_precmd() { } albatross_tls_start () { + echo "Starting ${name}." /usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_tls_user}" \ "${procname}" ${albatross_tls_flags} } diff --git a/packaging/rc.d/albatross_x b/packaging/rc.d/albatross_x index c1af803..d1c9b98 100755 --- a/packaging/rc.d/albatross_x +++ b/packaging/rc.d/albatross_x @@ -37,6 +37,7 @@ extra_commands="status" albatross_x_start () { case $1 in _ALL) + echo "Starting albatross VMs: ${albatross_x_vms}." for _vm in $albatross_x_vms; do eval _create_args=\"\$albatross_x_args_${_vm}\" /usr/local/sbin/vmmc_local create $_vm $_create_args @@ -44,6 +45,7 @@ albatross_x_start () { return ;; esac + echo "Starting albatross VMs: ${@}." for _vm in $@; do eval _create_args=\"\$albatross_x_args_${_vm}\" /usr/local/sbin/vmmc_local create $_vm $_create_args @@ -53,10 +55,12 @@ albatross_x_start () { albatross_x_stop () { case $1 in _ALL) + echo "Stopping albatross VMs: ${albatross_x_vms}." for _vm in $albatross_x_vms do /usr/local/sbin/vmmc_local destroy $_vm; done return esac + echo "Stopping albatross VMs: ${@}." for _vm in $@ do /usr/local/sbin/vmmc_local destroy $_vm; done } From 79f06d57e8bf4392cef48851e8d0b260301cf8d4 Mon Sep 17 00:00:00 2001 From: Stefan Grundmann Date: Thu, 8 Nov 2018 08:53:15 +0000 Subject: [PATCH 2/2] FreeBSD rc scripts: fix precmd in _tls and _influx --- packaging/rc.d/albatross_influx | 2 ++ packaging/rc.d/albatross_tls | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packaging/rc.d/albatross_influx b/packaging/rc.d/albatross_influx index d94fdd5..b01b2c3 100755 --- a/packaging/rc.d/albatross_influx +++ b/packaging/rc.d/albatross_influx @@ -23,6 +23,8 @@ rcvar=${name}_enable desc="Albatross influx service" load_rc_config $name start_cmd="albatross_influx_start" +start_precmd="albatross_influx_precmd" + : ${albatross_influx_enable:="NO"} : ${albatross_influx_flags:=""} diff --git a/packaging/rc.d/albatross_tls b/packaging/rc.d/albatross_tls index 9aa132c..60a1125 100755 --- a/packaging/rc.d/albatross_tls +++ b/packaging/rc.d/albatross_tls @@ -23,6 +23,8 @@ rcvar=${name}_enable desc="Albatross tls service" load_rc_config $name start_cmd="albatross_tls_start" +start_precmd="albatross_tls_precmd" + : ${albatross_tls_enable:="NO"} : ${albatross_tls_flags:=""}