Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
OpenNebula
:
4.0
>
opennebula4
> openneb_LSBhead-4.0.0.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File openneb_LSBhead-4.0.0.patch of Package opennebula4
--- share/scripts/one.orig 2013-05-08 20:38:58.286637934 +0200 +++ share/scripts/one 2013-05-08 20:42:26.938637151 +0200 @@ -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 @@ -172,13 +198,13 @@ if [ "$STARTED" == "false" ]; then stop - exit -1 + exit 7 fi } start_oned() { - $ONED -f 2>&1 & + /sbin/startproc -u oneadmin -g cloud $ONED -f 2>&1 LASTRC=$? LASTPID=$! @@ -193,7 +219,7 @@ start_sched() { - $ONE_SCHEDULER& + /sbin/startproc -u oneadmin -g cloud $ONE_SCHEDULER& LASTRC=$? LASTPID=$! @@ -218,24 +244,38 @@ start) setup start + rc_status -v ;; stop) stop echo "oned and scheduler stopped" + rc_status -v ;; start-sched) start_sched + rc_status -v ;; stop-sched) stop_sched + rc_status -v ;; restart-sched) stop_sched + rc_status -v sleep 1 start_sched + 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