git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3cb138
)
ctdb.init: behave correctly when calling "service ctdb stop" on stopped service
author
Michael Adam
<obnox@samba.org>
Fri, 12 Dec 2008 15:00:07 +0000
(16:00 +0100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Mon, 15 Dec 2008 22:51:00 +0000
(09:51 +1100)
When "service ctdb stop" is called and the ctdbd is not running,
don't print the "Failed to connect to daemon" error messages.
But print a warning and exit with status success instead.
Michael
config/ctdb.init
patch
|
blob
|
history
diff --git
a/config/ctdb.init
b/config/ctdb.init
index 674298351e4ee6dabfc59445148d7c3c322e4d98..de3acfb571f8edaca75a5c9763dd6e3e7e8a2995 100755
(executable)
--- a/
config/ctdb.init
+++ b/
config/ctdb.init
@@
-148,6
+148,18
@@
start() {
stop() {
echo -n $"Shutting down ctdbd service: "
+ ctdb ping >& /dev/null || {
+ echo -n " Warning: ctdbd not running ! "
+ case $init_style in
+ suse)
+ rc_status -v
+ ;;
+ redhat)
+ echo ""
+ ;;
+ esac
+ return 0
+ }
ctdb shutdown
RETVAL=$?
count=0