mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 16:13:35 +00:00
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: Martin Pitt <martin.pitt@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
65b27d845f
commit
84b3775a09
@ -45,6 +45,13 @@ STOPOPTS="-a -A -s"
|
||||
test ! -r "$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
|
||||
test ! -r "$sysconfdir"/sysconfig/lxc ||
|
||||
. "$sysconfdir"/sysconfig/lxc
|
||||
|
Loading…
Reference in New Issue
Block a user