Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
OpenNebula
:
3.2
>
opennebula3
> openneb_LSBhead.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File openneb_LSBhead.patch of Package opennebula3
--- share/scripts/one.orig 2012-02-18 19:17:50.462555851 +0100 +++ share/scripts/one 2012-02-18 19:31:56.975887322 +0100 @@ -16,6 +16,32 @@ # limitations under the License. # #--------------------------------------------------------------------------- # +# /etc/init.d/one +### BEGIN INIT INFO +# Provides: one +# Required-Start: $remote_fs $syslog $network +# Required-Stop: $remote_fs $syslog +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Cloud infrastructure service +# Description: The oned is the daemon process controlling the OpenNebula +# cloud instrastructure +### END INIT INFO + +# First reset status of this service +. /etc/rc.status +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - insufficient privilege +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running + if [ -z "$ONE_LOCATION" ]; then ONE_PIDDIR=/var/run/one ONE_PID=/var/run/one/oned.pid @@ -135,7 +161,7 @@ fi # Start the one daemon - $ONED -f 2>&1 & + /sbin/startproc -u oneadmin -g cloud $ONED -f 2>&1 LASTRC=$? LASTPID=`pidof $ONED` @@ -148,7 +174,7 @@ fi # Start the scheduler - $ONE_SCHEDULER& + /sbin/startproc -u oneadmin -g cloud $ONE_SCHEDULER& LASTRC=$? LASTPID=`pidof $ONE_SCHEDULER` @@ -181,7 +207,7 @@ if [ "$STARTED" == "false" ]; then stop - exit -1 + exit 7 fi } @@ -197,13 +223,23 @@ start) setup start + rc_status -v ;; stop) stop echo "oned and scheduler stopped" + rc_status -v ;; + restart) + $0 stop + $0 start + rc_status + ;; + reload) + $0 restart + ;; *) - echo "Usage: one [-b] {start|stop}" >&2 + echo "Usage: one [-b] {start|stop|reload|restart}" >&2 echo "Options:" >&2 echo " -b Backup log file." >&2 exit 3