Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d45c45
)
Merging to head, BUG#405
author
narasimd
<narasimd>
Wed, 11 Dec 2002 06:53:25 +0000
(06:53 +0000)
committer
narasimd
<narasimd>
Wed, 11 Dec 2002 06:53:25 +0000
(06:53 +0000)
lustre/scripts/lustre
patch
|
blob
|
history
diff --git
a/lustre/scripts/lustre
b/lustre/scripts/lustre
index
b62dc4c
..
95c1d06
100755
(executable)
--- a/
lustre/scripts/lustre
+++ b/
lustre/scripts/lustre
@@
-35,19
+35,37
@@
fi
[ -x ${LCONF} -a -f ${LUSTRE_CONFIG_XML} ] || exit 0
[ -x ${LCONF} -a -f ${LUSTRE_CONFIG_XML} ] || exit 0
+# Create /var/lustre directory
+# This is used by snmp agent for checking lustre services \
+# status online/offline/online pending/offline pending.
+
+[ -d ${STATUS_DIR:=/var/lustre} ] || mkdir -p $STATUS_DIR
+STATUS=${STATUS_DIR}/sysStatus
+
start() {
echo -n "Starting $SERVICE: "
start() {
echo -n "Starting $SERVICE: "
- ${LCONF} ${LCONF_START_ARGS}
+
${LCONF} ${LCONF_START_ARGS}
RETVAL=$?
echo $SERVICE
RETVAL=$?
echo $SERVICE
- [ $RETVAL -eq 0 ] && touch $LOCK
+ if [ $RETVAL -eq 0 ]; then
+ touch $LOCK
+ echo "online" >$STATUS
+ else
+ echo "online pending" >$STATUS
+ fi
}
stop() {
echo -n "Shutting down $SERVICE: "
}
stop() {
echo -n "Shutting down $SERVICE: "
- ${LCONF} ${LCONF_STOP_ARGS}
- echo $SERVICE
- rm -f $LOCK
+ ${LCONF} ${LCONF_STOP_ARGS}
+ RETVAL=$?
+ echo $SERVICE
+ rm -f $LOCK
+ if [ $RETVAL -eq 0 ]; then
+ echo "offline" >$STATUS
+ else
+ echo "offline pending" >$STATUS
+ fi
}
restart() {
}
restart() {