Commit 84b3775a by Martin Pitt Committed by Stéphane Graber

systemd: Ensure action() is defined

If /etc/rc.d/init.d/functions is not present or does not define an action() function, provide a simple fallback using "echo". Signed-off-by: 's avatarMartin Pitt <martin.pitt@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 65b27d84
...@@ -45,6 +45,13 @@ STOPOPTS="-a -A -s" ...@@ -45,6 +45,13 @@ STOPOPTS="-a -A -s"
test ! -r "$sysconfdir"/rc.d/init.d/functions || test ! -r "$sysconfdir"/rc.d/init.d/functions ||
. "$sysconfdir"/rc.d/init.d/functions . "$sysconfdir"/rc.d/init.d/functions
# provide action() fallback
if ! type action >/dev/null 2>&1; then
action() {
echo "$@"
}
fi
# Source any configurable options # Source any configurable options
test ! -r "$sysconfdir"/sysconfig/lxc || test ! -r "$sysconfdir"/sysconfig/lxc ||
. "$sysconfdir"/sysconfig/lxc . "$sysconfdir"/sysconfig/lxc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment