]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
initscript: make crun/valgrind init arguments override conf
authorSage Weil <sage@newdream.net>
Mon, 23 Mar 2009 22:17:21 +0000 (15:17 -0700)
committerSage Weil <sage@newdream.net>
Mon, 23 Mar 2009 22:29:43 +0000 (15:29 -0700)
src/init-ceph

index f4e0fef28fde252514a6bc015c6898108ad809f9..c24cc9c023d7ce609bdc29f98c5b4fbb42658c63 100755 (executable)
@@ -60,8 +60,8 @@ stop_daemon() {
 options=
 
 version=0
-dovalgrind=0
-docrun=0
+dovalgrind=
+docrun=
 allhosts=0
 debug=0
 monaddr=
@@ -157,10 +157,10 @@ for name in $what; do
            wrap=""
            runmode=""
            
-           get_conf_bool crun "$docrun" "restart on core dump"
+           [ -z "$crun" ] && get_conf_bool crun "0" "restart on core dump"
            [ "$crun" -eq 1 ] && wrap="$BINDIR/crun"
            
-           get_conf_bool valgrind "$dovalgrind" "valgrind"
+           [ -z "$dovalgrind" ] && get_conf_bool valgrind "0" "valgrind"
            [ "$valgrind" -eq 1 ] && wrap="$wrap valgrind"
            
            [ -n "$wrap" ] && runmode="-f &"