We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3073718 commit a89e658Copy full SHA for a89e658
packaging/common/script-templates/script-common.sh
@@ -53,7 +53,14 @@ restore_cfengine_state() {
53
# $1 -- file where the state to restore is saved (see get_cfengine_state())
54
55
if type systemctl >/dev/null 2>&1; then
56
- xargs -n1 -a "$1" systemctl start
+ for service in `cat "$1"`; do
57
+ definition=`systemctl cat "$service"` || continue
58
+ # only try to start service that are defined/exist (some may be gone
59
+ # in the new version)
60
+ if [ -n "$definition" ]; then
61
+ systemctl start "$service"
62
+ fi
63
+ done
64
else
65
CALLED_FROM_STATE_RESTORE=1
66
if [ -f ${PREFIX}/bin/cfengine3-nova-hub-init-d.sh ]; then
0 commit comments