From 6a7ab04d9bc090facdd9ceca0f37faafde57ed8c Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Tue, 1 Nov 2022 17:23:00 -0600 Subject: [PATCH] fixes #389 regarding shutdown order --- usr/local/etc/rc.d/bastille | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/local/etc/rc.d/bastille b/usr/local/etc/rc.d/bastille index 870a2857..84edfb28 100755 --- a/usr/local/etc/rc.d/bastille +++ b/usr/local/etc/rc.d/bastille @@ -51,7 +51,9 @@ bastille_stop() local _jail - for _jail in ${bastille_list}; do + ## reverse order of list for shutdown ## fixes #389 + bastille_revlist=$(echo "${bastille_list}" | awk '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }') + for _jail in ${bastille_revlist}; do echo "Stopping Bastille Container: ${_jail}" ${command} stop ${_jail} done