Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
OpenNebula
:
3.8
>
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-10-29 09:00:34.239596761 +0100 +++ share/scripts/one 2012-10-29 09:02:30.491600164 +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 @@ -136,7 +162,7 @@ fi # Start the one daemon - $ONED -f 2>&1 & + /sbin/startproc -u oneadmin -g cloud $ONED -f 2>&1 LASTRC=$? LASTPID=$! @@ -149,7 +175,7 @@ fi # Start the scheduler - $ONE_SCHEDULER& + /sbin/startproc -u oneadmin -g cloud $ONE_SCHEDULER& LASTRC=$? LASTPID=$! @@ -182,7 +208,7 @@ if [ "$STARTED" == "false" ]; then stop - exit -1 + exit 7 fi } @@ -198,13 +224,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 [-f] {start|stop}" >&2 + echo "Usage: one [-f] {start|stop|reload|restart}" >&2 echo "Options:" >&2 echo " -f Do not backup log file." >&2 exit 3