]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init: Actually do start the daemons when 'service ceph start <type>' is specified
authorWido den Hollander <wido@widodh.nl>
Tue, 28 Feb 2012 11:41:42 +0000 (12:41 +0100)
committerSage Weil <sage@newdream.net>
Tue, 28 Feb 2012 17:10:52 +0000 (09:10 -0800)
A bug in my previous patch prevented any daemon with auto_start set to false from starting.

This patch allows:
* /etc/init.d/ceph start osd|mds|mon
* service ceph start osd|mds|mon

It however does not start daemons if auto_start is disabled when you invoke:
* /etc/init.d/ceph start
* service ceph start

Signed-off-by: Wido den Hollander <wido@widodh.nl>
src/init-ceph.in

index 80d3784b6bb6f72c9417bb9f9d74648dd3092431..e2bd569e8080de11b935b171903f58ed9a12671d 100644 (file)
@@ -187,8 +187,10 @@ for name in $what; do
     if [ "$command" = "start" ]; then
         get_conf auto_start "" "auto start"
         if [ "$auto_start" = "no" ] || [ "$auto_start" = "false" ] || [ "$auto_start" = "0" ]; then
-            echo "Skipping Ceph $name on $host... auto start is disabled"
-            continue
+            if [ -z "$@" ]; then
+                echo "Skipping Ceph $name on $host... auto start is disabled"
+                continue
+            fi
         fi
 
        if daemon_is_running $name ceph-$type $id $pid_file; then