Can't install hamachi on MGA 3

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Can't install hamachi on MGA 3

Postby dkeith » Oct 7th, '13, 16:20

The mga2 hamachi package won't install, because it complains that sysvinit-legacy isn't intalled:

Code: Select all
#urpmi logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm
A requested package cannot be installed:
logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64 (due to unsatisfied sysvinit-legacy)



Yet it is installed:

Code: Select all
# urpmi sysvinit-legacy -y
Package sysvinit-legacy-tools-2.87-21.mga3.x86_64 is already installed


Anyone know why this is?

Is there a package in the works for hamachi on mga3?

Thanks.
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby jiml8 » Oct 7th, '13, 17:02

My guess is there is a versioning issue with the sysvinit-legacy. You might try the --allow-force option of urpmi. It is unlikely to get you into trouble, though it might.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 7th, '13, 17:14

Code: Select all
# urpmi logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm --allow-force
WARNING: --allow-force option is in use. Some strange problems may happen


warning: logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID af85c592: NOKEY
The following package has bad signature:
logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm: Invalid signature (NOT OK (no key): logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID af85c592: NOKEY)
Do you want to continue installation ? (y/N) y
installing logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm
Installation failed:
   sysvinit-legacy is needed by logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64
Try installation without checking dependencies? (y/N) y
Preparing...                     ###############################################################################################################
      1/1: logmein-hamachi       ###############################################################################################################
Starting logmein-hamachi (via systemctl):  Job for logmein-hamachi.service failed. See 'systemctl status logmein-hamachi.service' and 'journalctl -n' for details.
                                                                [FAILED]
warning: %post(logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64) scriptlet failed, exit status 1
ERROR: 'script' failed for logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64:


systemctl status:

Code: Select all
# systemctl status logmein-hamachi.service
logmein-hamachi.service - LSB: LogMeIn Hamachi for Linux is a secure VPN client for the Linux .
     Loaded: loaded (/etc/rc.d/init.d/logmein-hamachi)
     Active: failed (Result: exit-code) since Mon, 2013-10-07 11:07:14 EDT; 1min 20s ago
    Process: 19602 ExecStart=/etc/rc.d/init.d/logmein-hamachi start (code=exited, status=203/EXEC)
     CGroup: name=systemd:/system/logmein-hamachi.service

Oct 07 11:07:14 DAVIDOPTIPLEX9010 systemd[19602]: Failed at step EXEC spawning /etc/rc.d/init.d/logmein-hamachi: Exec format error
Oct 07 11:07:14 DAVIDOPTIPLEX9010 systemd[1]: Failed to start LSB: LogMeIn Hamachi for Linux is a secure VPN client for the Linux ..
Oct 07 11:07:14 DAVIDOPTIPLEX9010 systemd[1]: Unit logmein-hamachi.service entered failed state


journalctl -n:

Code: Select all
# journalctl -n
-- Logs begin at Mon, 2013-09-02 15:37:01 EDT, end at Mon, 2013-10-07 11:08:56 EDT. --
Oct 07 11:07:15 DAVIDOPTIPLEX9010 NetworkManager[1104]: ifcfg-rh:     warning: Unable to discover MAC address: ioctl error
Oct 07 11:07:15 DAVIDOPTIPLEX9010 NetworkManager[1104]: ifcfg-rh:     error: Unknown BOOTPROTO 'no'
Oct 07 11:07:56 DAVIDOPTIPLEX9010 smbd[19816]: [2013/10/07 11:07:56.073408,  0] printing/print_cups.c:151(cups_connect)
Oct 07 11:07:56 DAVIDOPTIPLEX9010 smbd[19816]: Unable to connect to CUPS server localhost:631 - Connection refused
Oct 07 11:07:56 DAVIDOPTIPLEX9010 smbd[3222]: [2013/10/07 11:07:56.073507,  0] printing/print_cups.c:528(cups_async_callback)
Oct 07 11:07:56 DAVIDOPTIPLEX9010 smbd[3222]: failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
Oct 07 11:08:56 DAVIDOPTIPLEX9010 smbd[20098]: [2013/10/07 11:08:56.077356,  0] printing/print_cups.c:151(cups_connect)
Oct 07 11:08:56 DAVIDOPTIPLEX9010 smbd[20098]: Unable to connect to CUPS server localhost:631 - Connection refused
Oct 07 11:08:56 DAVIDOPTIPLEX9010 smbd[3222]: [2013/10/07 11:08:56.077459,  0] printing/print_cups.c:528(cups_async_callback)
Oct 07 11:08:56 DAVIDOPTIPLEX9010 smbd[3222]: failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby doktor5000 » Oct 7th, '13, 22:27

dkeith wrote:Yet it is installed:

Code: Select all
# urpmi sysvinit-legacy -y
Package sysvinit-legacy-tools-2.87-21.mga3.x86_64 is already installed


Anyone know why this is?


No it's not installed, by using --fuzzy/-y you're kind of cheating, as urpmi will select the most similar named package.
Yet sysvinit-legacy isn't provided by any package
Code: Select all
[doktor5000@localhost SPECS]$ LC_ALL=C urpmq --whatprovides sysvinit-legacy
No package named sysvinit-legacy


That's always a problem with third party packages, only really few get this right ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 7th, '13, 23:25

Thanks for the reply. Is there anything that I can do to point it to what it's looking for? Is there a package that I could symlink/alias to that might make this bugger happy?
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby doktor5000 » Oct 7th, '13, 23:56

Well, according to your output the package is installed but the %post scriptlet failed.
Check what it does via
Code: Select all
rpm -q --scripts logemein-hamachi
and adapt.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 8th, '13, 00:06

In order to get a semblance of an installation I have to use the --allow-force option. So we're starting off on the wrong foot already:

Code: Select all
# urpmi --allow-force logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm
WARNING: --allow-force option is in use. Some strange problems may happen


warning: logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID af85c592: NOKEY
The following package has bad signature:
logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm: Invalid signature (NOT OK (no key): logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID af85c592: NOKEY)
Do you want to continue installation ? (y/N) y
installing logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm
Installation failed:
   sysvinit-legacy is needed by logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64
Try installation without checking dependencies? (y/N) y
Preparing...                     #############################################################################################################
      1/1: logmein-hamachi       #############################################################################################################
Starting logmein-hamachi (via systemctl):  Job for logmein-hamachi.service failed. See 'systemctl status logmein-hamachi.service' and 'journalctl -n' for details.
                                                                [FAILED]
warning: %post(logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64) scriptlet failed, exit status 1
ERROR: 'script' failed for logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64:


Even with --allow-force, rpm doesn't see an installation of hamachi:

Code: Select all
# rpm -q --scripts logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm
package logmein-hamachi-2.1.0.17-1.mrc.mga2.x86_64.rpm is not installed
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby doktor5000 » Oct 8th, '13, 00:59

You may need --allow-force --allow-nodeps. --allow-force alone doesn't work.

The problem is that logmein-hamachi requires a facility that is not satisfied by any package.
Either get the src.rpm for it, adjust the Requires tag there, rebuild it and install that, or rebuild one of your installed packages
and add a Provides: sysvinit-legacy
Those are arbitrary tags, and say nothing why this is needed for what exactly.

Find out why it needs "sysvinit-legacy" and adapt.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 8th, '13, 19:07

Ok, the mga2 version of hamachi obviously isn't going to work. So I obtained the latest version on the logmein.com website.

Code: Select all
# urpmi logmein-hamachi-2.1.0.119-1.x86_64.rpm


SECURITY: The following package is _NOT_ signed (OK ((none))): logmein-hamachi-2.1.0.119-1.x86_64.rpm
installing logmein-hamachi-2.1.0.119-1.x86_64.rpm
Preparing...                     ##############################################################################################################
      1/1: logmein-hamachi       ##############################################################################################################
mknod: ‘/dev/net/tun’: File exists
install_initd ok.
Starting logmein-hamachi (via systemctl):  Job for logmein-hamachi.service failed. See 'systemctl status logmein-hamachi.service' and 'journalctl -n' for details.
                                                                [FAILED]
warning: %post(logmein-hamachi-2.1.0.119-1.x86_64) scriptlet failed, exit status 1
ERROR: 'script' failed for logmein-hamachi-2.1.0.119-1.x86_64:


There is no source version available (understandably).

systemctl status logmein-hamachi.service:

Code: Select all
# systemctl status logmein-hamachi.service
logmein-hamachi.service - LSB: Start/stop logmein-hamachi engine
     Loaded: loaded (/etc/rc.d/init.d/logmein-hamachi)
     Active: failed (Result: timeout) since Tue, 2013-10-08 12:41:16 EDT; 3min 8s ago
    Process: 11387 ExecStart=/etc/rc.d/init.d/logmein-hamachi start (code=killed, signal=TERM)
     CGroup: name=systemd:/system/logmein-hamachi.service

Oct 08 12:29:34 DAVIDOPTIPLEX9010 systemd[1]: Starting LSB: Start/stop logmein-hamachi engine...
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: Failed to start LSB: Start/stop logmein-hamachi engine.
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: Unit logmein-hamachi.service entered failed state
Oct 08 12:41:16 DAVIDOPTIPLEX9010 logmein-hamachi[11387]: Starting LogMeIn Hamachi VPN tunneling engine logmein-hamachi


journalctl -n:

Code: Select all
# journalctl -n
...
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: logmein-hamachi.service operation timed out. Terminating.
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: Failed to start LSB: Start/stop logmein-hamachi engine.
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: Unit logmein-hamachi.service entered failed state
Oct 08 12:41:16 DAVIDOPTIPLEX9010 logmein-hamachi[11387]: Starting LogMeIn Hamachi VPN tunneling engine logmein-hamachi


Can anyone suggest a way or provide a link on how to debug the script error?

Thanks.
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby doktor5000 » Oct 8th, '13, 21:46

dkeith wrote:# systemctl status logmein-hamachi.service
logmein-hamachi.service - LSB: Start/stop logmein-hamachi engine
Loaded: loaded (/etc/rc.d/init.d/logmein-hamachi)
Active: failed (Result: timeout) since Tue, 2013-10-08 12:41:16 EDT; 3min 8s ago
Process: 11387 ExecStart=/etc/rc.d/init.d/logmein-hamachi start (code=killed, signal=TERM)
CGroup: name=systemd:/system/logmein-hamachi.service

Oct 08 12:29:34 DAVIDOPTIPLEX9010 systemd[1]: Starting LSB: Start/stop logmein-hamachi engine...
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: Failed to start LSB: Start/stop logmein-hamachi engine.
Oct 08 12:41:16 DAVIDOPTIPLEX9010 systemd[1]: Unit logmein-hamachi.service entered failed state


Look at what that script does, understand it, execute it manually and adapt where necessary.

FWIW, no need to post journalctl -n output, as that's already contained in systemctl status output, by default that shows last 10 lines of log for that service when called as root.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 8th, '13, 22:09

Thanks doktor, unfortunately I'm not a bash programmer, that's why I'm asking for help. If you can't help I understand, but you don't need to keep repeating the same non-answer.

Thanks.
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby doktor5000 » Oct 8th, '13, 22:54

What non-answer? Just posted what one would do normally to find out why it's not working.

If you don't at least post the script, do you want helpers to guess and search the package you downloaded, install it and look at the file themselves?
The harder you make it for people, the less replies you will get. If you look at the thread, only one other poster answered once.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 9th, '13, 04:47

/etc/init.d/logmein-hamachi script:

Code: Select all
#! /bin/sh -xv
### BEGIN INIT INFO
# Provides:          logmein-hamachi
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop logmein-hamachi engine
### END INIT INFO
#
# Author: LogMeIn, Inc. <hamachilinux-feedback@logmein.com>
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="LogMeIn Hamachi VPN tunneling engine"
NAME=logmein-hamachi
DAEMON=/opt/logmein-hamachi/bin/hamachid
DNAME=hamachid
PIDFILE=/var/run/logmein-hamachi/hamachid.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 5

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Define LSB log_* functions. Depend on lsb-base (>= 3.0-6)
. /lib/lsb/init-functions

# start the daemon/service

do_start()
{
    # Return
    #   0 if daemon has been started
    #   1 if daemon was already running
    #   2 if daemon could not be started

    start_daemon -p $PIDFILE $DAEMON

    return "$?"
}

# stop the daemon/service

do_stop()
{
    # Return
    #   0 if daemon has been stopped
    #   1 if daemon was already stopped
    #   2 if daemon could not be stopped
    #   other if a failure occurred

    # killproc -p $PIDFILE $DAEMON
    killall $DNAME

   # it needs some time for the engine to close all things and exit
   sleep 3
   
    RETVAL="$?"
    # [ "$RETVAL" = 2 ] && return 2

    # remove pidfile if daemon could not delete on exit.
    rm -f $PIDFILE

    return "$RETVAL"
}

case "$1" in
  start)
    echo -n "Starting $DESC $NAME"

    do_start

    case "$?" in
        0|1) log_success_msg ;;
        *)   log_failure_msg ;;
    esac
    ;;
  stop)
    echo -n "Stopping $DESC $NAME"

    do_stop

    case "$?" in
        0|1) log_success_msg ;;
        2)   log_failure_msg ;;
    esac
    ;;
  restart|force-reload)
    echo -n "Restarting $DESC $NAME"


    do_stop
    case "$?" in
      0|1)
        sleep 1
        do_start

        case "$?" in
            0) log_success_msg ;;
            1) log_failure_msg ;; # Old process is still running
            *) log_failure_msg ;; # Failed to start
        esac
        ;;
      *)
          # Failed to stop
        log_failure_msg
        ;;
    esac
    ;;
  *)

    log_warning_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
    exit 3
    ;;
esac

:


dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22

Re: Can't install hamachi on MGA 3

Postby doktor5000 » Oct 9th, '13, 21:13

Please run the script manually as root and post the output here.

Code: Select all
/etc/init.d/logmein-hamachi start
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

[CLOSED] Re: Can't install hamachi on MGA 3

Postby dkeith » Oct 9th, '13, 21:26

normal output of /etc/init.d/logmein-hamachi start:

Code: Select all
# /etc/init.d/logmein-hamachi start
Starting logmein-hamachi (via systemctl):  Job for logmein-hamachi.service failed. See 'systemctl status logmein-hamachi.service' and 'journalctl -n' for details.
                                                                                                                                 [FAILED]



debug output of /etc/init.d/logmein-hamachi start:

Code: Select all
# /etc/init.d/logmein-hamachi start
#! /bin/sh -xv
### BEGIN INIT INFO
# Provides:          logmein-hamachi
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop logmein-hamachi engine
### END INIT INFO
#
# Author: LogMeIn, Inc. <hamachilinux-feedback@logmein.com>
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="LogMeIn Hamachi VPN tunneling engine"
+ DESC='LogMeIn Hamachi VPN tunneling engine'
NAME=logmein-hamachi
+ NAME=logmein-hamachi
DAEMON=/opt/logmein-hamachi/bin/hamachid
+ DAEMON=/opt/logmein-hamachi/bin/hamachid
DNAME=hamachid
+ DNAME=hamachid
PIDFILE=/var/run/logmein-hamachi/hamachid.pid
+ PIDFILE=/var/run/logmein-hamachi/hamachid.pid
SCRIPTNAME=/etc/init.d/$NAME
+ SCRIPTNAME=/etc/init.d/logmein-hamachi

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 5
+ '[' -x /opt/logmein-hamachi/bin/hamachid ']'

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+ '[' -r /etc/default/logmein-hamachi ']'

# Define LSB log_* functions. Depend on lsb-base (>= 3.0-6)
. /lib/lsb/init-functions
+ . /lib/lsb/init-functions
#!/bin/sh
# LSB compliant init functions

# source standard Mandrake init functions
. /etc/init.d/functions
++ . /etc/init.d/functions
# -*-Shell-script-*-
#
# functions   This file contains functions to be used by most or all
#      shell scripts in the /etc/init.d directory.
#

TEXTDOMAIN=initscripts
+++ TEXTDOMAIN=initscripts
TEXTDOMAINDIR=/etc/locale
+++ TEXTDOMAINDIR=/etc/locale
LOCPATH=/etc/locale
+++ LOCPATH=/etc/locale
export TEXTDOMAINDIR LOCPATH
+++ export TEXTDOMAINDIR LOCPATH

TMP=/tmp
+++ TMP=/tmp
TMPDIR=/tmp
+++ TMPDIR=/tmp
export TMP TMPDIR
+++ export TMP TMPDIR

# Make sure umask is sane
umask 022
+++ umask 022

# Set up a default search path.
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
+++ export PATH

if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \
      ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then
        case "$0" in
        /etc/init.d/*|/etc/rc.d/init.d/*)
      _use_systemctl=1
      ;;
   esac
fi
+++ '[' 7463 -ne 1 -a -z '' ']'
+++ /bin/mountpoint -q /cgroup/systemd
+++ /bin/mountpoint -q /sys/fs/cgroup/systemd
+++ case "$0" in
+++ _use_systemctl=1

systemctl_redirect () {
   local s
   local prog=${1##*/}
        local command=$2
        local options=""

   case "$command" in
   start)
      s=`gprintf "Starting %s (via systemctl): " $prog`
      ;;
   stop)
      s=`gprintf "Stopping %s (via systemctl): " $prog`
      ;;
   reload|try-reload)
      s=`gprintf "Reloading %s configuration (via systemctl): " $prog`
      ;;
   restart|try-restart|condrestart)
      s=`gprintf "Restarting %s (via systemctl): " $prog`
      ;;
   esac

        if [ -n "$SYSTEMCTL_IGNORE_DEPENDENCIES" ] ; then
                options="$options --ignore-dependencies"
        fi
        if [ -n "$SYSTEMCTL_NO_BLOCK" ] ; then
                options="$options --no-block"
        fi

   action "$s" /bin/systemctl $options $command "$prog.service"
}


if [ -z "${CONSOLETYPE:-}" ]; then
  if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
    CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
  else
    CONSOLETYPE="serial"
  fi
fi
+++ '[' -z '' ']'
+++ '[' -c /dev/stderr -a -r /dev/stderr ']'
/sbin/consoletype < /dev/stderr 2>/dev/null)"
/sbin/consoletype < /dev/stderr 2>/dev/null)
/sbin/consoletype < /dev/stderr 2>/dev/null
++++ /sbin/consoletype
+++ CONSOLETYPE=pty

# Get a sane screen width, and default to 80 when exact info not available
[ -z "${COLUMNS:-}" ] && COLUMNS=`stty -a 2>/dev/null | sed -n 's/.*columns \([0-9]*\);.*/\1/p'`
+++ '[' -z '' ']'
stty -a 2>/dev/null | sed -n 's/.*columns \([0-9]*\);.*/\1/p'
++++ stty -a
++++ sed -n 's/.*columns \([0-9]*\);.*/\1/p'
+++ COLUMNS=146
[ -z "${COLUMNS:-}" ] && COLUMNS=80
+++ '[' -z 146 ']'

function load_i18_settings() {
    if [ -f /etc/sysconfig/i18n -o -f /etc/locale.conf ]; then
        if [ -z "$NOLOCALE" ]; then
            if [ -f /etc/locale.conf ]; then
                . /etc/locale.conf
            else
                . /etc/sysconfig/i18n
            fi
            if [ "$CONSOLETYPE" != "pty" ]; then
                [ "$CONSOLE_NOT_LOCALIZED" = "yes" ] && GP_LANG=C
                [ "$CONSOLE_NOT_LOCALIZED" = "yes" ] && GP_LANGUAGE=C
            fi
            if [ -z "$GP_LANG" ]; then
                [ -n "$LC_CTYPE" ] && GP_LANG=$LC_CTYPE || GP_LANG=$LC_MESSAGES
            fi
            if [ -z "$GP_LANGUAGE" ]; then
                [ -n "$LANGUAGE" ] && GP_LANGUAGE=$LANGUAGE || GP_LANGUAGE=$GP_LANG
            fi
        fi
    fi
}

function reset_i18_settings() {
    local CONSOLE_NOT_LOCALIZED=yes
    LC_ALL=C
    load_i18_settings
}

load_i18_settings
+++ load_i18_settings
+++ '[' -f /etc/sysconfig/i18n -o -f /etc/locale.conf ']'
+++ '[' -z '' ']'
+++ '[' -f /etc/locale.conf ']'
+++ . /etc/sysconfig/i18n
LANGUAGE=en_US.UTF-8:en_US:en
++++ LANGUAGE=en_US.UTF-8:en_US:en
LC_ADDRESS=en_US.UTF-8
++++ LC_ADDRESS=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
++++ LC_COLLATE=en_US.UTF-8
LC_NAME=en_US.UTF-8
++++ LC_NAME=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
++++ LC_NUMERIC=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
++++ LC_MEASUREMENT=en_US.UTF-8
LC_TIME=en_US.UTF-8
++++ LC_TIME=en_US.UTF-8
LANG=en_US.UTF-8
++++ LANG=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
++++ LC_IDENTIFICATION=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
++++ LC_MESSAGES=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
++++ LC_CTYPE=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
++++ LC_TELEPHONE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
++++ LC_MONETARY=en_US.UTF-8
LC_PAPER=en_US.UTF-8
++++ LC_PAPER=en_US.UTF-8
SYSFONT=lat0-16
++++ SYSFONT=lat0-16
+++ '[' pty '!=' pty ']'
+++ '[' -z '' ']'
+++ '[' -n en_US.UTF-8 ']'
+++ GP_LANG=en_US.UTF-8
+++ '[' -z '' ']'
+++ '[' -n en_US.UTF-8:en_US:en ']'
+++ GP_LANGUAGE=en_US.UTF-8:en_US:en

# Read in our configuration
if [ -z "${BOOTUP:-}" ]; then
  if [ -f /etc/sysconfig/init ]; then
      . /etc/sysconfig/init
  else
    # This all seem confusing? Look in /etc/sysconfig/init,
    # or in /usr/share/doc/initscripts-*/sysconfig.txt
    BOOTUP=color
    RES_COL=$((COLUMNS - 15))
    MOVE_TO_COL="echo -en \\033[${RES_COL}G"
    SETCOLOR_SUCCESS="echo -en \\033[1;32m"
    SETCOLOR_FAILURE="echo -en \\033[1;31m"
    SETCOLOR_WARNING="echo -en \\033[1;33m"
    SETCOLOR_NORMAL="echo -en \\033[0;39m"
    LOGLEVEL=1
  fi
  if [ "$CONSOLETYPE" = "serial" ]; then
      BOOTUP=serial
      MOVE_TO_COL=
      SETCOLOR_SUCCESS=
      SETCOLOR_FAILURE=
      SETCOLOR_WARNING=
      SETCOLOR_NORMAL=
  fi
fi
+++ '[' -z '' ']'
+++ '[' -f /etc/sysconfig/init ']'
+++ . /etc/sysconfig/init
# color => new RH6.0 bootup
# verbose => old-style bootup
# anything else => new style bootup without ANSI colors or positioning
BOOTUP=color
++++ BOOTUP=color
# column to start "[  OK  ]" label in
RES_COL=$((COLUMNS - 15))
++++ RES_COL=131
# terminal sequence to move to that column. You could change this
# to something like "tput hpa ${RES_COL}" if your terminal supports it
MOVE_TO_COL="echo -en \\033[${RES_COL}G"
++++ MOVE_TO_COL='echo -en \033[131G'
# terminal sequence to set color to a 'success' color (currently: green)
SETCOLOR_SUCCESS="echo -en \\033[1;32m"
++++ SETCOLOR_SUCCESS='echo -en \033[1;32m'
# terminal sequence to set color to a 'failure' color (currently: red)
SETCOLOR_FAILURE="echo -en \\033[1;31m"
++++ SETCOLOR_FAILURE='echo -en \033[1;31m'
# terminal sequence to set color to a 'warning' color (currently: yellow)
SETCOLOR_WARNING="echo -en \\033[1;33m"
++++ SETCOLOR_WARNING='echo -en \033[1;33m'
# terminal sequence to reset to the default color.
SETCOLOR_NORMAL="echo -en \\033[0;39m"
++++ SETCOLOR_NORMAL='echo -en \033[0;39m'
# default kernel loglevel on boot (syslog will reset this)
LOGLEVEL=3
++++ LOGLEVEL=3
# Set to anything other than 'no' to allow hotkey interactive startup...
PROMPT=yes
++++ PROMPT=yes
# Set to 'yes' to allow probing for devices with swap signatures
AUTOSWAP=no
++++ AUTOSWAP=no
# What ttys should gettys be started on?
ACTIVE_CONSOLES=/dev/tty[1-6]
++++ ACTIVE_CONSOLES='/dev/tty[1-6]'
# Set to '/sbin/sulogin' to prompt for password on single-user mode
# Set to '/sbin/sushell' otherwise
SINGLE=/sbin/sushell
++++ SINGLE=/sbin/sushell
+++ '[' pty = serial ']'

gprintf() {
        if [ -x /bin/gettext -a -n "$1" ]; then
      if [ -n "$GP_LANG" ]; then
          local TEXT=`LC_ALL=$GP_LANG LANGUAGE=$GP_LANGUAGE gettext -e --domain=$TEXTDOMAIN -- "$1"`
      else
          local TEXT=`gettext -e --domain=$TEXTDOMAIN -- "$1"`
      fi
   else
      local TEXT=$1
   fi
   [ "${1#*\\n}" ] || TEXT="$TEXT\n"

   shift
   printf -- "$TEXT" "$@"
}   

# Frontend to gprintf (support up to 4 %s in format string)
# returns the message transleted in GPRINTF_MSG and
# the resting parms in GPRINTF_REST
# This simplifies a lot the call of functions like action,
# now with i18n support
gprintf_msg_rest() {
case "$1" in
       *%s*%s*%s*%s*)
               GPRINTF_MSG=$(gprintf "$1" "$2" "$3" "$4" "$5")
               shift 5;;
       *%s*%s*%s*)
               GPRINTF_MSG=$(gprintf "$1" "$2" "$3" "$4")
               shift 4;;
       *%s*%s*)
               GPRINTF_MSG=$(gprintf "$1" "$2" "$3")
               shift 3;;
       *%s*)
               GPRINTF_MSG=$(gprintf "$1" "$2")
               shift 2;;
       *)
               GPRINTF_MSG=$(gprintf "$1")
               shift;;
esac
GPRINTF_REST="$@"
}

# Check if $pid (could be plural) are running with
# the same root as this script
inmyroot() {
   local i r

   for i in $* ; do
      [ "/proc/$i/root" -ef "/proc/$$/root" ] && r="$r $i"
   done
   echo "$r"
}


# Check if any of $pid (could be plural) are running
checkpid() {
   local i

   for i in $* ; do
      [ -d "/proc/$i" ] && return 0
   done
   return 1
}

# __proc_pids {program} [pidfile]
# Set $pid to pids from /var/run* for {program}.  $pid should be declared
# local in the caller.
# Returns LSB exit code for the 'status' action.
__pids_var_run() {
   local base=${1##*/}
   local pid_file=${2:-/var/run/$base.pid}

   pid=
   if [ -f "$pid_file" ] ; then
           local line p

      [ ! -r "$pid_file" ] && return 4 # "user had insufficient privilege"
      while : ; do
         read line
         [ -z "$line" ] && break
         for p in $line ; do
            [ -z "${p//[0-9]/}" ] && [ -d "/proc/$p" ] && pid="$pid $p"
         done
      done < "$pid_file"

           if [ -n "$pid" ]; then
                   return 0
           fi
      return 1 # "Program is dead and /var/run pid file exists"
   fi
   return 3 # "Program is not running"
}

# Output PIDs of matching processes, found using pidof
__pids_pidof() {
   pidof -c -m -o $$ -o $PPID -o %PPID -x "$1" || \
      pidof -c -m -o $$ -o $PPID -o %PPID -x "${1##*/}"
}


# A function to start a program.
daemon() {
   # Test syntax.
   local gotbase= force= nicelevel corelimit
   local pid base= user= nice= bg= pid_file=
   local cgroup=
   nicelevel=0
   while [ "$1" != "${1##[-+]}" ]; do
     case $1 in
       '')    gprintf "%s: Usage: daemon [+/-nicelevel] {program}\n" $0
              return 1;;
       --check)
         base=$2
         gotbase="yes"
         shift 2
         ;;
       --check=?*)
             base=${1#--check=}
         gotbase="yes"
         shift
         ;;
       --user)
         user=$2
         shift 2
         ;;
       --user=?*)
              user=${1#--user=}
         shift
         ;;
       --pidfile)
         pid_file=$2
         shift 2
         ;;
       --pidfile=?*)
         pid_file=${1#--pidfile=}
         shift
         ;;
       --force)
             force="force"
         shift
         ;;
       [-+][0-9]*)
             nice="nice -n $1"
              shift
         ;;
       *)     gprintf "%s: Usage: daemon [+/-nicelevel] {program}\n" $0
              return 1;;
     esac
   done

        # Save basename.
        [ -z "$gotbase" ] && base=${1##*/}

        # See if it's already running. Look *only* at the pid file.
   __pids_var_run "$base" "$pid_file"

   [ -n "$pid" -a -z "$force" ] && return

   # make sure it doesn't core dump anywhere unless requested
   corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}"
   
   # if they set NICELEVEL in /etc/sysconfig/foo, honor it
   [ -n "${NICELEVEL:-}" ] && nice="nice -n $NICELEVEL"
   
   # if they set CGROUP_DAEMON in /etc/sysconfig/foo, honor it
   if [ -n "${CGROUP_DAEMON}" ]; then
      if [ ! -x /bin/cgexec ]; then
         echo -n "Cgroups not installed"; warning
         echo
      else
         cgroup="/bin/cgexec";
         for i in $CGROUP_DAEMON; do
            cgroup="$cgroup -g $i";
         done
      fi
   fi

   # Echo daemon
        [ "${BOOTUP:-}" = "verbose" -a -z "${LSB:-}" ] && echo -n " $base"

   # And start it up.
   if [ -z "$user" ]; then
      $cgroup $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*"
   else
      $cgroup $nice su -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*"
   fi
   rc=$?
   [ $rc = 0 ] && success "%s startup" $base || failure "%s startup" $base
   return $rc
}

# A function to stop a program.
killproc() {
   local RC killlevel= base pid pid_file= delay try

   RC=0; delay=3; try=0
   # Test syntax.
   if [ "$#" -eq 0 ]; then
      gprintf "Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
      return 1
   fi
   if [ "$1" = "-p" ]; then
      pid_file=$2
      shift 2
   fi
   if [ "$1" = "-d" ]; then
      delay=$(echo $2 | awk -v RS=' ' -v IGNORECASE=1 '{if($1!~/^[0-9.]+[smhd]?$/) exit 1;d=$1~/s$|^[0-9.]*$/?1:$1~/m$/?60:$1~/h$/?60*60:$1~/d$/?24*60*60:-1;if(d==-1) exit 1;delay+=d*$1} END {printf("%d",delay+0.5)}')
      if [ "$?" -eq 1 ]; then
         gprintf "Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]\n"
         return 1
      fi
      shift 2
   fi
       

   # check for second arg to be kill level
   [ -n "${2:-}" ] && killlevel=$2

        # Save basename.
        base=${1##*/}

        # Find pid.
   __pids_var_run "$1" "$pid_file"
   RC=$?
   if [ -z "$pid" ]; then
      if [ -z "$pid_file" ]; then
         pid="$(__pids_pidof "$1")"
      else
         [ "$RC" = "4" ] && { failure "%s shutdown" $base ; return $RC ;}
      fi
   fi

   # Avoid killing processes not running in the same root
   [ -n "$pid" ] && pid="`inmyroot $pid`"
   
        # Kill it.
        if [ -n "$pid" ] ; then
                [ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base "
      if [ -z "$killlevel" ] ; then
             if checkpid $pid 2>&1; then
            # TERM first, then KILL if not dead
            kill -TERM $pid >/dev/null 2>&1
            usleep 50000
            if checkpid $pid ; then
            try=0
            while [ $try -lt $delay ] ; do
               checkpid $pid || break
               sleep 1
               let try+=1
            done
            if checkpid $pid ; then
               kill -KILL $pid >/dev/null 2>&1
               usleep 50000
            fi
            fi
              fi
         checkpid $pid
         RC=$?
         [ "$RC" -eq 0 ] && failure "%s shutdown" $base || success "%s shutdown" $base
         RC=$((! $RC))
      # use specified level only
      else
              if checkpid $pid; then
                      kill $killlevel $pid >/dev/null 2>&1
            RC=$?
            [ "$RC" -eq 0 ] && success "%s %s" $base $killlevel || failure "%s %s" $base $killlevel
         elif [ -n "${LSB:-}" ]; then
            RC=7 # Program is not running
         fi
      fi
   else
      if [ -n "${LSB:-}" -a -n "$killlevel" ]; then
         RC=7 # Program is not running
      else
         failure "%s shutdown" $base
         RC=0
      fi
   fi

        # Remove pid file if any.
   if [ -z "$killlevel" ]; then
            rm -f "${pid_file:-/var/run/$base.pid}"
   fi
   return $RC
}

# A function to find the pid of a program. Looks *only* at the pidfile
pidfileofproc() {
   local pid

   # Test syntax.
   if [ "$#" -eq 0 ] ; then
      gprintf "Usage: pidfileofproc {program}\n"
      return 1
   fi

   __pids_var_run "$1"
   [ -n "$pid" ] && echo $pid
   return 0
}

# A function to find the pid of a program.
pidofproc() {
   local RC pid pid_file=

   # Test syntax.
   if [ "$#" = 0 ]; then
      gprintf "Usage: pidofproc [-p pidfile] {program}\n"
      return 1
   fi
   if [ "$1" = "-p" ]; then
      pid_file=$2
      shift 2
   fi
   fail_code=3 # "Program is not running"

   # First try "/var/run/*.pid" files
   __pids_var_run "$1" "$pid_file"
   RC=$?
   if [ -n "$pid" ]; then
      echo $pid
      return 0
   fi

   [ -n "$pid_file" ] && return $RC
   __pids_pidof "$1" || return $RC
}

status() {
   local base pid lock_file= pid_file=

   # Test syntax.
   if [ "$#" = 0 ] ; then
      gprintf "Usage: status [-p pidfile] {program}\n"
      return 1
   fi
   if [ "$1" = "-p" ]; then
      pid_file=$2
      shift 2
   fi
   if [ "$1" = "-l" ]; then
      lock_file=$2
      shift 2
   fi
   base=${1##*/}

   if [ "$_use_systemctl" = "1" ]; then
      systemctl status ${0##*/}.service
      return $?
   fi

   # First try "pidof"
   __pids_var_run "$1" "$pid_file"
   RC=$?
   if [ -z "$pid_file" -a -z "$pid" ]; then
      pid="$(__pids_pidof "$1")"
   fi
   if [ -n "$pid" ]; then
           gprintf "%s (pid %s) is running...\n" ${base} "$pid"
           return 0
   fi

   case "$RC" in
      0)
         gprintf "%s (pid %s) is running...\n" ${base} "$pid"
         return 0
         ;;
      1)
                   gprintf "%s dead but pid file exists\n" ${base}
                   return 1
         ;;
      4)
         gprintf "%s status unknown due to insufficient privileges." ${base}
         return 4
         ;;
   esac
   if [ -z "${lock_file}" ]; then
      lock_file=${base}
   fi
   # See if /var/lock/subsys/${lock_file} exists
   if [ -f /var/lock/subsys/${lock_file} ]; then
      gprintf "%s dead but subsys locked\n" ${base}
      return 2
   fi
   gprintf "%s is stopped\n" ${base}
   return 3
}

echo_success() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
  gprintf "  OK  "
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 0
}

echo_failure() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
  gprintf "FAILED"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

echo_passed() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
  gprintf "PASSED"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

echo_warning() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
  gprintf "WARNING"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

# Inform the graphical boot of our current state
update_boot_stage() {
  rc_splash "$1"
}

# Log that something succeeded
success() {
  gprintf_msg_rest "$@"
  #if [ -z "${IN_INITLOG:-}" ]; then
  #   initlog $INITLOG_ARGS -n $0 -s "$GPRINTF_MSG" -e 1
  #fi
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_success
  return 0
}

# Log that something failed
failure() {
  local rc=$?
  gprintf_msg_rest "$@"
  #if [ -z "${IN_INITLOG:-}" ]; then
  #   initlog $INITLOG_ARGS -n $0 -s "$GPRINTF_MSG" -e 2
  #fi
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_failure
  return $rc
}

# Log that something passed, but may have had errors. Useful for fsck
passed() {
  local rc=$?
  gprintf_msg_rest "$@"
  #if [ -z "${IN_INITLOG:-}" ]; then
  #   initlog $INITLOG_ARGS -n $0 -s "$GPRINTF_MSG" -e 1
  #fi
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_passed
  return $rc


# Log a warning
warning() {
  local rc=$?
  gprintf_msg_rest "$@"
  #if [ -z "${IN_INITLOG:-}" ]; then
  #   initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
  #fi
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_warning
  return $rc


# Run some action. Log its output.
action() {
  local rc
  gprintf_msg_rest "$@"
  echo -n "$GPRINTF_MSG "

  $GPRINTF_REST && success "$GPRINTF_MSG" || failure "$GPRINTF_MSG"
  rc=$?
  echo
  return $rc
}

# returns OK if $1 contains $2
strstr() {
  [ "${1#*$2*}" = "$1" ] && return 1
  return 0
}

# Check whether file $1 is a backup or rpm-generated file and should be ignored
is_ignored_file() {
    case "$1" in
   *~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave)
       return 0
       ;;
    esac
    return 1
}

# Evaluate shvar-style booleans
is_true() {
    case "$1" in
   [tT] | [yY] | [yY][eE][sS] | [tT][rR][uU][eE])
   return 0
   ;;
    esac
    return 1
}

# Evaluate shvar-style booleans
is_false() {
    case "$1" in
   [fF] | [nN] | [nN][oO] | [fF][aA][lL][sS][eE])
   return 0
   ;;
    esac
    return 1
}

# Apply sysctl settings, including files in /etc/sysctl.d
apply_sysctl() {
    if [ -x /lib/systemd/systemd-sysctl ]; then
   /lib/systemd/systemd-sysctl
    else
        for file in /usr/lib/sysctl.d/*.conf ; do
            is_ignored_file "$file" && continue
            [ -f /run/sysctl.d/${file##*/} ] && continue
            [ -f /etc/sysctl.d/${file##*/} ] && continue
            test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
        done
        for file in /run/sysctl.d/*.conf ; do
            is_ignored_file "$file" && continue
            [ -f /etc/sysctl.d/${file##*/} ] && continue
            test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
        done
        for file in /etc/sysctl.d/*.conf ; do
            is_ignored_file "$file" && continue
            test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
        done
        sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
    fi
}

# A sed expression to filter out the files that is_ignored_file recognizes
__sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
+++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'

if [ "$_use_systemctl" = "1" ]; then
        if  [ "x$1" = xstart -o \
                "x$1" = xstop -o \
                "x$1" = xrestart -o \
                "x$1" = xreload -o \
                "x$1" = xtry-restart -o \
                "x$1" = xforce-reload -o \
                "x$1" = xcondrestart ] ; then

      systemctl_redirect $0 $1
      exit $?
   fi
fi
+++ '[' 1 = 1 ']'
+++ '[' xstart = xstart -o xstart = xstop -o xstart = xrestart -o xstart = xreload -o xstart = xtry-restart -o xstart = xforce-reload -o xstart = xcondrestart ']'
+++ systemctl_redirect /etc/init.d/logmein-hamachi start
+++ local s
+++ local prog=logmein-hamachi
+++ local command=start
+++ local options=
+++ case "$command" in
gprintf "Starting %s (via systemctl): " $prog
++++ gprintf 'Starting %s (via systemctl): ' logmein-hamachi
++++ '[' -x /bin/gettext -a -n 'Starting %s (via systemctl): ' ']'
++++ '[' -n en_US.UTF-8 ']'
LC_ALL=$GP_LANG LANGUAGE=$GP_LANGUAGE gettext -e --domain=$TEXTDOMAIN -- "$1"
+++++ LC_ALL=en_US.UTF-8
+++++ LANGUAGE=en_US.UTF-8:en_US:en
+++++ gettext -e --domain=initscripts -- 'Starting %s (via systemctl): '
++++ local 'TEXT=Starting %s (via systemctl): '
++++ '[' 'Starting %s (via systemctl): ' ']'
++++ shift
++++ printf -- 'Starting %s (via systemctl): ' logmein-hamachi
+++ s='Starting logmein-hamachi (via systemctl): '
+++ '[' -n '' ']'
+++ '[' -n '' ']'
+++ action 'Starting logmein-hamachi (via systemctl): ' /bin/systemctl start logmein-hamachi.service
+++ local rc
+++ gprintf_msg_rest 'Starting logmein-hamachi (via systemctl): ' /bin/systemctl start logmein-hamachi.service
+++ case "$1" in
gprintf "$1")
gprintf "$1"
++++ gprintf 'Starting logmein-hamachi (via systemctl): '
++++ '[' -x /bin/gettext -a -n 'Starting logmein-hamachi (via systemctl): ' ']'
++++ '[' -n en_US.UTF-8 ']'
LC_ALL=$GP_LANG LANGUAGE=$GP_LANGUAGE gettext -e --domain=$TEXTDOMAIN -- "$1"
+++++ LC_ALL=en_US.UTF-8
+++++ LANGUAGE=en_US.UTF-8:en_US:en
+++++ gettext -e --domain=initscripts -- 'Starting logmein-hamachi (via systemctl): '
++++ local 'TEXT=Starting logmein-hamachi (via systemctl): '
++++ '[' 'Starting logmein-hamachi (via systemctl): ' ']'
++++ shift
++++ printf -- 'Starting logmein-hamachi (via systemctl): '
+++ GPRINTF_MSG='Starting logmein-hamachi (via systemctl): '
+++ shift
+++ GPRINTF_REST='/bin/systemctl start logmein-hamachi.service'
+++ echo -n 'Starting logmein-hamachi (via systemctl):  '
Starting logmein-hamachi (via systemctl):  +++ /bin/systemctl start logmein-hamachi.service
Job for logmein-hamachi.service failed. See 'systemctl status logmein-hamachi.service' and 'journalctl -n' for details.
+++ failure 'Starting logmein-hamachi (via systemctl): '
+++ local rc=1
+++ gprintf_msg_rest 'Starting logmein-hamachi (via systemctl): '
+++ case "$1" in
gprintf "$1")
gprintf "$1"
++++ gprintf 'Starting logmein-hamachi (via systemctl): '
++++ '[' -x /bin/gettext -a -n 'Starting logmein-hamachi (via systemctl): ' ']'
++++ '[' -n en_US.UTF-8 ']'
LC_ALL=$GP_LANG LANGUAGE=$GP_LANGUAGE gettext -e --domain=$TEXTDOMAIN -- "$1"
+++++ LC_ALL=en_US.UTF-8
+++++ LANGUAGE=en_US.UTF-8:en_US:en
+++++ gettext -e --domain=initscripts -- 'Starting logmein-hamachi (via systemctl): '
++++ local 'TEXT=Starting logmein-hamachi (via systemctl): '
++++ '[' 'Starting logmein-hamachi (via systemctl): ' ']'
++++ shift
++++ printf -- 'Starting logmein-hamachi (via systemctl): '
+++ GPRINTF_MSG='Starting logmein-hamachi (via systemctl): '
+++ shift
+++ GPRINTF_REST=
+++ '[' color '!=' verbose -a -z '' ']'
+++ echo_failure
+++ '[' color = color ']'
+++ echo -en '\033[131G'
                                                                                                                                  +++ echo -n '['
[+++ '[' color = color ']'
+++ echo -en '\033[1;31m'
+++ gprintf FAILED
+++ '[' -x /bin/gettext -a -n FAILED ']'
+++ '[' -n en_US.UTF-8 ']'
LC_ALL=$GP_LANG LANGUAGE=$GP_LANGUAGE gettext -e --domain=$TEXTDOMAIN -- "$1"
++++ LC_ALL=en_US.UTF-8
++++ LANGUAGE=en_US.UTF-8:en_US:en
++++ gettext -e --domain=initscripts -- FAILED
+++ local TEXT=FAILED
+++ '[' FAILED ']'
+++ shift
+++ printf -- FAILED
FAILED+++ '[' color = color ']'
+++ echo -en '\033[0;39m'
+++ echo -n ']'
]+++ echo -ne '\r'
+++ return 1
+++ return 1
+++ rc=1
+++ echo

+++ return 1
+++ exit 1
dkeith
 
Posts: 52
Joined: Oct 1st, '13, 18:22


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest