[lxc-devel] [PATCH 4/6] systemd: Ensure action() is defined
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Jul 31 17:56:47 UTC 2014
Quoting Martin Pitt (martin.pitt at ubuntu.com):
> If /etc/rc.d/init.d/functions is not present or does not define an action()
> function, provide a simple fallback using "echo".
> ---
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> config/init/sysvinit/lxc.in | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/config/init/sysvinit/lxc.in b/config/init/sysvinit/lxc.in
> index a850341..7cad8c8 100644
> --- a/config/init/sysvinit/lxc.in
> +++ b/config/init/sysvinit/lxc.in
> @@ -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
> --
> 2.0.1
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list