]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
init-radosgw.sysv: remove 4606/head
authorSage Weil <sage@redhat.com>
Thu, 7 May 2015 22:40:05 +0000 (15:40 -0700)
committerSage Weil <sage@redhat.com>
Thu, 14 May 2015 16:51:14 +0000 (09:51 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
ceph.spec.in
src/Makefile.am
src/init-radosgw.sysv [deleted file]

index 378254e2510d945d48562c5d452a140a50aa334d..1f10c1a856188c06a90583aac65390ab11d8b4dd 100644 (file)
@@ -492,7 +492,7 @@ make DESTDIR=$RPM_BUILD_ROOT install
 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
 find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
 install -D src/init-ceph $RPM_BUILD_ROOT%{_initrddir}/ceph
-install -D src/init-radosgw.sysv $RPM_BUILD_ROOT%{_initrddir}/ceph-radosgw
+install -D src/init-radosgw $RPM_BUILD_ROOT%{_initrddir}/ceph-radosgw
 install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap
 install -D src/rbdmap $RPM_BUILD_ROOT%{_sysconfdir}/ceph/rbdmap
 %if 0%{?_with_systemd}
index 92cb4a206ccf16000984fea2238a3f14d0c5f053..74153c91fdd6d59b614635d673be772c3afa7339 100644 (file)
@@ -73,7 +73,6 @@ EXTRA_DIST += \
        $(srcdir)/ceph-osd-prestart.sh \
        $(srcdir)/ceph_common.sh \
        $(srcdir)/init-radosgw \
-       $(srcdir)/init-radosgw.sysv \
        $(srcdir)/init-rbdmap \
        $(srcdir)/ceph-clsinfo \
        $(srcdir)/make_version \
diff --git a/src/init-radosgw.sysv b/src/init-radosgw.sysv
deleted file mode 100644 (file)
index 505cfee..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#! /bin/bash
-### BEGIN INIT INFO
-# Provides:          radosgw
-# Required-Start:    $remote_fs $named $network $time
-# Required-Stop:     $remote_fs $named $network $time
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: radosgw RESTful rados gateway
-### END INIT INFO
-
-PATH=/sbin:/bin:/usr/bin
-
-#. /lib/lsb/init-functions
-. /etc/rc.d/init.d/functions
-
-daemon_is_running() {
-    daemon=$1
-    sleep 1
-    if pidof $daemon >/dev/null; then
-        echo "$daemon is running."
-        exit 0
-    else
-        echo "$daemon is not running."
-        exit 1
-    fi
-}
-
-VERBOSE=0
-for opt in $*; do
-    if [ "$opt" = "-v" ] || [ "$opt" = "--verbose" ]; then
-       VERBOSE=1
-    fi
-done
-
-# prefix for radosgw instances in ceph.conf
-PREFIX='client.radosgw.'
-
-# user to run radosgw as (if not specified in ceph.conf)
-#DEFAULT_USER='www-data'
-DEFAULT_USER='root'
-
-RADOSGW=`which radosgw`
-if [ ! -x "$RADOSGW" ]; then
-    [ $VERBOSE -eq 1 ] && echo "$RADOSGW could not start, it is not executable."
-    exit 1
-fi
-
-# detect systemd, also check whether the systemd-run binary exists
-SYSTEMD_RUN=$(which systemd-run 2>/dev/null)
-grep -qs systemd /proc/1/comm || SYSTEMD_RUN=""
-
-case "$1" in
-    start)
-        echo "Starting radosgw instance(s)..."
-        for name in `ceph-conf --list-sections $PREFIX`;
-        do
-            auto_start=`ceph-conf -n $name 'auto start'`
-            if [ "$auto_start" = "no" ] || [ "$auto_start" = "false" ] || [ "$auto_start" = "0" ]; then
-                continue
-            fi
-
-            # mapped to this host?
-            host=`ceph-conf -n $name host`
-            hostname=`hostname -s`
-            if [ "$host" != "$hostname" ]; then
-                [ $VERBOSE -eq 1 ] && echo "hostname $hostname could not be found in ceph.conf:[$name], not starting."
-                continue
-            fi
-
-            user=`ceph-conf -n $name user`
-            if [ -z "$user" ]; then
-                user="$DEFAULT_USER"
-            fi
-
-            log_file=`$RADOSGW -n $name --show-config-value log_file`
-            if [ -n "$log_file" ]; then
-                if [ ! -e "$log_file" ]; then
-                    touch "$log_file"
-                fi
-                chown $user $log_file
-            fi
-
-            if [ -n "$SYSTEMD_RUN" ]; then
-                $SYSTEMD_RUN -r sudo -u "$user" bash -c "ulimit -n 32768; $RADOSGW -n $name"
-            else
-               ulimit -n 32768
-                daemon --user="$user" "$RADOSGW -n $name"
-            fi
-            echo "Starting $name..."
-        done
-        daemon_is_running $RADOSGW
-        ;;
-    reload)
-        #start-stop-daemon --signal HUP -x $RADOSGW --oknodo
-        killproc $RADOSGW -SIGHUP
-        echo "Reloading radosgw instance(s)..."
-        ;;
-    restart|force-reload)
-        $0 stop
-        $0 start
-        ;;
-    stop)
-        #start-stop-daemon --stop -x $RADOSGW --oknodo
-        timeout=0
-        for name in `ceph-conf --list-sections $PREFIX`;
-        do
-          t=`$RADOSGW -n $name --show-config-value rgw_exit_timeout_secs`
-          if [ $t -gt $timeout ]; then timeout=$t; fi
-        done
-
-        killproc $RADOSGW
-        echo "Stopping radosgw instance(s)..."
-        while pidof $RADOSGW >/dev/null && [ $timeout -gt 0 ] ; do
-          sleep 1
-          timeout=$(($timeout - 1))
-        done
-        ;;
-    status)
-        daemon_is_running $RADOSGW
-        ;;
-    *)
-        echo "Usage: $0 {start|stop|restart|force-reload|reload|status} [-v|--verbose]" >&2
-        exit 3
-        ;;
-esac