oned-issue1289.patch
oned 2012-05-25 16:50:18.000000000 +0200 | ||
---|---|---|
4 | 4 |
# |
5 | 5 |
# Starts the OpenNebula daemon |
6 | 6 |
# |
7 |
# chkconfig: 345 26 74
|
|
7 |
# chkconfig: 345 65 35
|
|
8 | 8 |
# description: Starts the OpenNebula daemon |
9 | 9 |
# processname: oned |
10 | 10 | |
... | ... | |
18 | 18 |
# Description: start and stop oned |
19 | 19 |
### END INIT INFO |
20 | 20 | |
21 |
prog="oned" |
|
22 | ||
21 | 23 |
ONE_BIN=/usr/bin/one |
24 |
LOCKFILE=/var/lock/subsys/${prog} |
|
22 | 25 | |
23 | 26 |
# Source function library. |
24 | 27 |
. /etc/rc.d/init.d/functions |
... | ... | |
39 | 42 |
daemon --user oneadmin $ONE_BIN start |
40 | 43 |
RETVAL=$? |
41 | 44 |
echo |
45 |
[ $RETVAL -eq 0 ] && touch $LOCKFILE |
|
42 | 46 |
return $RETVAL |
43 | 47 |
} |
44 | 48 | |
45 | 49 |
stop() { |
46 | ||
47 | 50 |
check |
48 | 51 | |
49 | 52 |
echo -n $"Stopping OpenNebula daemon: " |
50 | 53 |
su oneadmin -s /bin/sh -c "$ONE_BIN stop" |
51 | 54 |
RETVAL=$? |
55 | ||
56 |
[ $RETVAL -eq 0 ] && success || failure |
|
52 | 57 |
echo |
58 |
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE |
|
53 | 59 |
return $RETVAL |
54 | 60 |
} |
55 | 61 | |
... | ... | |
70 | 76 |
restart |
71 | 77 |
;; |
72 | 78 |
status) |
73 |
status oned
|
|
79 |
status $prog
|
|
74 | 80 |
RETVAL=$? |
75 | 81 |
;; |
76 | 82 |
*) |