File 0002-SUSE-ify-sysvinit-scripts.patch of Package ceph.2107

From: Danny Kukawka <dkukawka@suse.de>
Date: Thu, 5 Jun 2014 00:02:26 +0200
Subject: [PATCH] SUSE-ify sysvinit scripts

This is a squash of the following four closely-related commits:
ab16e3056e8fc7f26855ca0c58c88ed716443dc1 rcfiles-remove-init-2.patch
2cd29db16497917e2e5737b7f1b52dbb77b038c2 radosgw-init-opensuse.patch
a3ca39c182bb3ee0d175cdb92d10a86d2ce268ec 0001-fix-runlevels-for-start-scripts.patch
363022a4a2bb90b8bfe640b02e7458048e2940de fixup of radosgw-init-opensuse.patch

Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 6dba97bb7fff31eea89078eb8cbabd38049cc3ed)
---
 src/init-ceph.in | 2 +-
 src/init-radosgw | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/init-ceph.in b/src/init-ceph.in
index 7276830..5fb8d6d 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -4,7 +4,7 @@
 
 ### BEGIN INIT INFO
 # Provides:          ceph
-# Default-Start:     2 3 4 5
+# Default-Start:     3 5
 # Default-Stop:      0 1 6
 # Required-Start:    $remote_fs $named $network $time
 # Required-Stop:     $remote_fs $named $network $time
diff --git a/src/init-radosgw b/src/init-radosgw
index 02d543c..8f6f4e8 100644
--- a/src/init-radosgw
+++ b/src/init-radosgw
@@ -3,7 +3,7 @@
 # Provides:          radosgw
 # Required-Start:    $remote_fs $named $network $time
 # Required-Stop:     $remote_fs $named $network $time
-# Default-Start:     2 3 4 5
+# Default-Start:     3 5
 # Default-Stop:      0 1 6
 # Short-Description: radosgw RESTful rados gateway
 # Description: radosgw RESTful rados gateway
@@ -35,7 +35,7 @@ done
 PREFIX='client.radosgw.'
 
 # user to run radosgw as (it not specified in ceph.conf)
-DEFAULT_USER='www-data'
+DEFAULT_USER='wwwrun'
 
 RADOSGW=`which radosgw`
 if [ ! -x "$RADOSGW" ]; then
@@ -74,7 +74,7 @@ case "$1" in
             fi
 
             echo "Starting $name..."
-            start-stop-daemon --start -u $user -x $RADOSGW -- -n $name
+	     /sbin/startproc -u $user $RADOSGW -n $name
         done
         daemon_is_running $RADOSGW
         ;;
@@ -98,7 +98,8 @@ case "$1" in
         start-stop-daemon --stop -x $RADOSGW --oknodo $TIMEOUT
         ;;
     status)
-        daemon_is_running $RADOSGW
+	 /sbin/checkproc $RADOSGW
+	 rc_status -v
         ;;
     *)
         echo "Usage: $0 {start|stop|restart|force-reload|reload|status} [-v|--verbose]" >&2
openSUSE Build Service is sponsored by