Skip to content

Commit ad3c50d

Browse files
committed
CFE-2949: Do not use '-r' with 'sed' when saving state on upgrade
Some platforms don't have this fancy feature of their 'sed' tool. It's okay to use it on the systemd-based platforms though, these are new enough.
1 parent 0f4e9ef commit ad3c50d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packaging/common/script-templates/script-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ get_cfengine_state() {
4545
if type systemctl >/dev/null 2>&1; then
4646
systemctl list-units -l | sed -r -e '/^\s*(cf-[-a-z]+|cfengine3)\.service/!d' -e 's/\s*(cf-[-a-z]+|cfengine3)\.service.*/\1/'
4747
else
48-
platform_service cfengine3 status | sed -r -e '/is running/!d' -e 's/^([-a-z]+).*/\1/'
48+
platform_service cfengine3 status | sed -e '/is running/!d' -e 's/^\([-a-z]\+\).*/\1/'
4949
fi
5050
}
5151

0 commit comments

Comments
 (0)