From 5f1c5d4b45898f321add55cf20d7203c8c09971a Mon Sep 17 00:00:00 2001 From: "Vladimir D. Seleznev" Date: Tue, 10 Jul 2018 01:43:04 +0300 Subject: [PATCH 4/6] ALT tune SysVinit scripts --- config/init/sysvinit/lxc-containers.in | 19 ++++++------------- config/init/sysvinit/lxc-net.in | 19 ++++++------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/config/init/sysvinit/lxc-containers.in b/config/init/sysvinit/lxc-containers.in index f793d2012..632a84914 100644 --- a/config/init/sysvinit/lxc-containers.in +++ b/config/init/sysvinit/lxc-containers.in @@ -17,25 +17,18 @@ # Description: Bring up/down LXC autostart containers ### END INIT INFO -# To be replaced by LSB functions, if they can be found -# Defined here for distributions that don't have log_daemon_msg -log_daemon_msg () { - echo $@ -} - -# Try to source LSB init functions to define LSB log_* functions. -test ! -r /lib/lsb/init-functions || - . /lib/lsb/init-functions +WITHOUT_RC_COMPAT=1 +. /etc/init.d/functions start() { # Setup host /dev for autodev containers. - log_daemon_msg "Starting LXC autoboot containers: " - @LIBEXECDIR@/lxc/lxc-containers start + action "Starting LXC autoboot containers:" \ + @LIBEXECDIR@/lxc/lxc-containers start } stop() { - log_daemon_msg "Stopping LXC containers: " - @LIBEXECDIR@/lxc/lxc-containers stop + action "Stopping LXC containers:" \ + @LIBEXECDIR@/lxc/lxc-containers stop } # See how we were called. diff --git a/config/init/sysvinit/lxc-net.in b/config/init/sysvinit/lxc-net.in index 7a1e62a78..16cd000f5 100644 --- a/config/init/sysvinit/lxc-net.in +++ b/config/init/sysvinit/lxc-net.in @@ -17,24 +17,17 @@ # Description: Bring up/down LXC Network Bridge ### END INIT INFO -# To be replaced by LSB functions, if they can be found -# Defined here for distributions that don't have log_daemon_msg -log_daemon_msg () { - echo $@ -} - -# Try to source LSB init functions to define LSB log_* functions. -test ! -r /lib/lsb/init-functions || - . /lib/lsb/init-functions +WITHOUT_RC_COMPAT=1 +. /etc/init.d/functions start() { - log_daemon_msg "Starting LXC network bridge: " - @LIBEXECDIR@/lxc/lxc-net start + action "Starting LXC network bridge:" \ + @LIBEXECDIR@/lxc/lxc-net start } stop() { - log_daemon_msg "Stopping LXC network bridge: " - @LIBEXECDIR@/lxc/lxc-net stop + action "Stopping LXC network bridge:" \ + @LIBEXECDIR@/lxc/lxc-net stop } # See how we were called. -- 2.25.2