Mageia Bugzilla – Attachment 3366 Details for
Bug 8647
systemd is not starting LSB initscripts automatically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
ftgpub1 initscript
ftgpub1 (text/plain), 1.82 KB, created by
Frank Griffin
on 2013-01-15 13:29:02 CET
(
hide
)
Description:
ftgpub1 initscript
Filename:
MIME Type:
Creator:
Frank Griffin
Created:
2013-01-15 13:29:02 CET
Size:
1.82 KB
patch
obsolete
>#!/bin/sh > ># ># This is an initscript for the ftgpub1 Virtual Machine. ># > > ># Comments to support chkconfig on Mandriva Linux ># chkconfig: 345 51 90 ># description: A public virtual server > ># Comments to support LSB init script conventions >### BEGIN INIT INFO ># Provides: ftgpub1 ># Required-Start: $local_fs $network-up $remote_fs ># Should-Start: ypbind nscd ldap ntpd ># Required-Stop: $local_fs $network-up $remote_fs ># Default-Start: 3 4 5 ># Default-Stop: 0 1 6 ># Short-Description: start and stop ftgpub1 ># Description: A public virtual server >### END INIT INFO > > ># Source function library. >. /etc/rc.d/init.d/functions > > ># ># Use LSB init script functions for printing messages, if possible ># >lsb_functions="/lib/lsb/init-functions" >if test -f $lsb_functions ; then > . $lsb_functions >else > log_success_msg() > { > echo " SUCCESS! $@" > } > log_failure_msg() > { > echo " ERROR! $@" > } >fi > ># ># Start, stop, or restart the engine. ># > >case "$1" in > 'start') > > # Don't start several instances. > ping -c 1 -w 1 -W 1 -q ftgpub1 >/dev/null 2>&1 > RC=$? > if [ "$RC" = "0" ] > then > echo -n "ftgpub1 is already running: " > success;echo > exit 1 > fi > > echo -n "Starting ftgpub1: " > > # Wait for the DHCP-assigned hostname to kick in > while [ $(hostname) = "localhost" ] > do > sleep 2 > done > > # ftgpub1 runs under the "ftg" ID. > daemon --user ftg "VBoxHeadless -s MageiaTreehouse &" > success;echo > exit 0 > ;; > > 'stop') > PID=$(ps ax | grep MageiaTreehouse) > PID=${PID%% *} > if [ -n $PID ] > then > echo -n "Shutting down ftgpub1: " > kill $PID > success;echo > exit 0 > else > log_failure_msg "ftgpub1 is not running" > exit 1 > fi > ;; > > 'restart') > $0 stop > $0 start > ;; > > *) > log_failure_msg "Unknown option $1" > >esac > >exit 0
#!/bin/sh # # This is an initscript for the ftgpub1 Virtual Machine. # # Comments to support chkconfig on Mandriva Linux # chkconfig: 345 51 90 # description: A public virtual server # Comments to support LSB init script conventions ### BEGIN INIT INFO # Provides: ftgpub1 # Required-Start: $local_fs $network-up $remote_fs # Should-Start: ypbind nscd ldap ntpd # Required-Stop: $local_fs $network-up $remote_fs # Default-Start: 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop ftgpub1 # Description: A public virtual server ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions # # Use LSB init script functions for printing messages, if possible # lsb_functions="/lib/lsb/init-functions" if test -f $lsb_functions ; then . $lsb_functions else log_success_msg() { echo " SUCCESS! $@" } log_failure_msg() { echo " ERROR! $@" } fi # # Start, stop, or restart the engine. # case "$1" in 'start') # Don't start several instances. ping -c 1 -w 1 -W 1 -q ftgpub1 >/dev/null 2>&1 RC=$? if [ "$RC" = "0" ] then echo -n "ftgpub1 is already running: " success;echo exit 1 fi echo -n "Starting ftgpub1: " # Wait for the DHCP-assigned hostname to kick in while [ $(hostname) = "localhost" ] do sleep 2 done # ftgpub1 runs under the "ftg" ID. daemon --user ftg "VBoxHeadless -s MageiaTreehouse &" success;echo exit 0 ;; 'stop') PID=$(ps ax | grep MageiaTreehouse) PID=${PID%% *} if [ -n $PID ] then echo -n "Shutting down ftgpub1: " kill $PID success;echo exit 0 else log_failure_msg "ftgpub1 is not running" exit 1 fi ;; 'restart') $0 stop $0 start ;; *) log_failure_msg "Unknown option $1" esac exit 0
View Attachment As Raw
Actions:
View
Attachments on
bug 8647
: 3366