]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/init-ceph.in: allow one((re)?start|stop) as commands 14560/head
authorWillem Jan Withagen <wjw@digiware.nl>
Fri, 14 Apr 2017 18:49:51 +0000 (20:49 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 18 Apr 2017 08:32:18 +0000 (10:32 +0200)
 - One FreeBSD these are the service command to start a service
   even if the service is not activated in /etc/rc.conf
   Which will allow ceph-disk and ceph-deploy to start even without
   setting /etc/rc.conf

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/init-ceph.in

index 9a0f95c65bda4f29f4f41e84c7d13d33ededcca0..48f44aa21f43f7006cee003357bf67fed521d888 100755 (executable)
@@ -261,7 +261,8 @@ get_local_name_list
 get_name_list "$@"
 
 # Reverse the order if we are stopping
-if [ "$command" = "stop" ]; then
+
+if [ "$command" = "stop" -o "$command" = "onestop"]; then
     for f in $what; do
        new_order="$f $new_order"
     done
@@ -286,7 +287,7 @@ for name in $what; do
 
     get_conf pid_file "$run_dir/$type.$id.pid" "pid file"
 
-    if [ "$command" = "start" ]; then
+    if [ "$command" = "start" -o "$command" = "onestart" ]; then
        if [ -n "$pid_file" ]; then
            do_cmd "mkdir -p "`dirname $pid_file`
            cmd="$cmd --pid-file $pid_file"
@@ -342,7 +343,7 @@ for name in $what; do
     get_conf asok "$run_dir/$cluster-$type.$id.asok" "admin socket"
 
     case "$command" in
-       start)
+       start|onestart)
             # Increase max_open_files, if the configuration calls for it.
             get_conf max_open_files "32768" "max open files"
 
@@ -454,7 +455,7 @@ for name in $what; do
            [ -n "$lockfile" ] && [ "$?" -eq 0 ] && touch $lockfile
            ;;
 
-       stop)
+       stop|onestop)
            get_conf pre_stop "" "pre stop command"
            get_conf post_stop "" "post stop command"
            [ -n "$pre_stop" ] && do_cmd "$pre_stop"
@@ -508,7 +509,7 @@ for name in $what; do
            signal_daemon $name ceph-$type $pid_file -1 "Reloading"
            ;;
 
-       restart)
+       restart|onerestart)
            $0 $options stop $name
            $0 $options start $name
            ;;