]> git.pld-linux.org Git - packages/sanlock.git/commitdiff
- updated to 2.5 auto/th/sanlock-2.5-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 30 Sep 2012 08:56:03 +0000 (10:56 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 30 Sep 2012 08:56:03 +0000 (10:56 +0200)
- updated init-pld patch

sanlock-init-pld.patch
sanlock.spec

index 06bd20e55c8ff3e0f563a76b76616db518297fee..470850ec320595a8dfcc20467b4ad07b0cf3b396 100644 (file)
@@ -1,6 +1,6 @@
---- sanlock-2.4/init.d/sanlock.orig    2012-07-23 16:24:38.000000000 +0200
-+++ sanlock-2.4/init.d/sanlock 2012-09-02 21:09:14.181273151 +0200
-@@ -32,94 +32,85 @@ SANLOCKOPTS="-U $SANLOCKUSER -G $SANLOCK
+--- sanlock-2.5/init.d/sanlock.orig    2012-09-30 10:16:54.308331928 +0200
++++ sanlock-2.5/init.d/sanlock 2012-09-30 10:51:21.691622171 +0200
+@@ -32,95 +32,86 @@
  [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
  
  start() {
 -      echo -n $"Starting $prog: "
 +      msg_starting "sanlock"
        daemon $prog daemon $SANLOCKOPTS
--      retval=$?
+       retval=$?
 -      echo
--      [ $retval -eq 0 ] && touch $lockfile
--      return $retval
-+      RETVAL=$?
-+      [ $RETVAL -eq 0 ] && touch $lockfile
-+      return $RETVAL
+       [ $retval -eq 0 ] && touch $lockfile
+       return $retval
  }
  
  stop() {
--      echo -n $"Sending stop signal $prog: "
 +      if [ ! -f /var/lock/subsys/sanlock ]; then
 +              msg_not_running "sanlock"
 +              return
 +      fi
+       PID=$(pidofproc -p $runfile $prog)
+-      echo -n $"Sending stop signal $prog ($PID): "
        killproc -p $runfile $prog -TERM
--      retval=$?
+       retval=$?
 -      echo
-+      RETVAL=$?
  
--      if [ $retval -ne 0 ]; then
--              return $retval
-+      if [ $RETVAL -ne 0 ]; then
-+              return $RETVAL
+       if [ $retval -ne 0 ]; then
+               return $retval
        fi
  
--      echo -n $"Waiting for $prog to stop:"
-+      show "Waiting for %s to stop" "$prog"
+-      echo -n $"Waiting for $prog ($PID) to stop:"
++      show "Waiting for %s (%s) to stop:" "$prog" "$PID"
 +      busy
        timeout=10
-       while [ -e $runfile ]; do
+       while checkpid $PID; do
                sleep 1
                timeout=$((timeout - 1))
                if [ "$timeout" -le 0 ]; then
 -                      failure; echo
+-                      return 1
 +                      fail
-                       return 1
++                      retval=1
++                      return $retval
                fi
        done
  
 -      success; echo
 +      ok
        rm -f $lockfile
--      return $retval
-+      return $RETVAL
+       return $retval
  }
  
 -restart() {
-+condrestart() {
-+      if [ ! -f /var/lock/subsys/sanlock ]; then
-+              msg_not_running "sanlock"
-+              RETVAL=$1
-+              return
-+      fi
-       stop && start
--      retval=$?
--      return $retval
+-      rh_status_q && stop
+-      start
 -}
 -
 -reload() {
 -
 -rh_status() {
 -      status $prog
-+      RETVAL=$?
-+      return $RETVAL
- }
+-}
+-
 -rh_status_q() {
 -      rh_status >/dev/null 2>&1
-+restart() {
++condrestart() {
++      if [ ! -f /var/lock/subsys/sanlock ]; then
++              msg_not_running "sanlock"
++              retval=$1
++              return $retval
++      fi
 +      stop && start
++      retval=$?
++      return $retval
  }
  
  case "$1" in
                ;;
        restart)
 -              $1
-+              restart
++              stop
++              start
                ;;
 -      reload)
 -              rh_status_q || exit 7
 -              rh_status_q || exit 0
 -              restart
 +              status --pidfile $runfile sanlock
-+              RETVAL=$?
++              retval=$?
                ;;
        *)
 -              echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
 -              exit 2
-+              msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
++              msg_usage "$0 {start|stop|status|restart||try-restart|force-reload}"
 +              exit 3
  esac
 -exit $?
--
-+exit $RETVAL
---- sanlock-2.4/init.d/wdmd.orig       2012-07-23 16:24:38.000000000 +0200
-+++ sanlock-2.4/init.d/wdmd    2012-09-02 21:14:08.491267019 +0200
++exit $retval
+--- sanlock-2.5/init.d/wdmd.orig       2012-09-24 17:35:09.000000000 +0200
++++ sanlock-2.5/init.d/wdmd    2012-09-30 10:51:00.684955942 +0200
 @@ -3,7 +3,7 @@
  # wdmd - watchdog multiplexing daemon
  #
  #
  
  
-@@ -32,83 +32,69 @@ WDMDOPTS="-G $WDMDGROUP"
- [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
- start() {
--      [ -x $exec ] || exit 5
--
--      if [ ! -d /var/run/$prog ]; then
--              mkdir -p /var/run/$prog
--              [ -x /sbin/restorecon ] && restorecon /var/run/$prog
--      fi
-+      # Check if the service is already running?
-+      if [ -f /var/lock/subsys/wdmd ]; then
-+              msg_already_running "wdmd"
-+              return
-+      fi
+@@ -33,105 +33,92 @@
  
+ watchdog_check() {
        if [ ! -c /dev/watchdog ]; then
 -              echo -n $"Loading the softdog kernel module: "
 +              show "Loading the softdog kernel module: "
 -              echo
 +              [ -c /dev/watchdog ] && ok || fail
        fi
+ }
  
+ start() {
++      # Check if the service is already running?
++      if [ -f /var/lock/subsys/wdmd ]; then
++              msg_already_running "wdmd"
++              return
++      fi
++ 
+       watchdog_check
+-      [ -x $exec ] || exit 5
+-
+-      if [ ! -d /var/run/$prog ]; then
+-              install -d -g $WDMDGROUP -m 775 /var/run/$prog
+-              [ -x /sbin/restorecon ] && restorecon /var/run/$prog
+-      fi
+-
 -      echo -n $"Starting $prog: "
 +      msg_starting "wdmd"
        daemon $prog $WDMDOPTS
--      retval=$?
+       retval=$?
 -      echo
--      [ $retval -eq 0 ] && touch $lockfile
--      return $retval
-+      RETVAL=$?
-+      [ $RETVAL -eq 0 ] && touch $lockfile
-+      return $RETVAL
+       [ $retval -eq 0 ] && touch $lockfile
+       return $retval
  }
  
  stop() {
--      echo -n $"Stopping $prog: "
--      killproc -p $runfile $prog -TERM
--      retval=$?
--      echo
--      [ $retval -eq 0 ] && rm -f $lockfile
--      return $retval
 +      if [ ! -f /var/lock/subsys/wdmd ]; then
 +              msg_not_running "wdmd"
 +              return
 +      fi
-+      killproc -p $runfile $prog
-+      RETVAL=$?
-+      [ $RETVAL -eq 0 ] && rm -f $lockfile
-+      return $RETVAL
+       PID=$(pidofproc -p $runfile $prog)
+-      echo -n $"Sending stop signal $prog ($PID): "
+       killproc -p $runfile $prog -TERM
+       retval=$?
+-      echo
+       if [ $retval -ne 0 ]; then
+               return $retval
+       fi
+-      echo -n $"Waiting for $prog ($PID) to stop:"
++      show "Waiting for %s (%s) to stop:" "$prog" "$PID"
+       timeout=10
+       while checkpid $PID; do
+               sleep 1
+               timeout=$((timeout - 1))
+               if [ "$timeout" -le 0 ]; then
+-                      failure; echo
+-                      return 1
++                      fail
++                      retval=1
++                      return $retval
+               fi
+       done
+-      success; echo
++      ok
+       rm -f $lockfile
+       return $retval
  }
  
 -restart() {
-+condrestart() {
-+      if [ ! -f /var/lock/subsys/wdmd ]; then
-+              msg_not_running "wdmd"
-+              RETVAL=$1
-+              return
-+      fi
-       stop
-       start
- }
+-      rh_status_q && stop
+-      start
+-}
 -
 -reload() {
 -      restart
 -
 -rh_status_q() {
 -      rh_status >/dev/null 2>&1
--}
--
-+ 
++condrestart() {
++      if [ ! -f /var/lock/subsys/wdmd ]; then
++              msg_not_running "wdmd"
++              retval=$1
++              return
++      fi
++      stop
++      start
+ }
  case "$1" in
        start)
 -              rh_status_q && exit 0
                ;;
        restart)
 -              $1
-+              stop
-+              start
-               ;;
+-              ;;
 -      reload)
 -              rh_status_q || exit 7
 -              $1
-+      try-restart)
-+              condrestart 0
++              stop
++              start
                ;;
        force-reload)
 -              force_reload
 +              condrestart 7
                ;;
-       status)
+-      status)
 -              rh_status
--              ;;
++      try-restart)
++              condrestart 0
+               ;;
 -      condrestart|try-restart)
 -              rh_status_q || exit 0
 -              restart
++      status)
 +              status --pidfile $runfile wdmd
                ;;
        *)
 -              echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
--              exit 2
-+              msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
-+              exit 3
++              msg_usage "$0 {start|stop|status|restart|try-restart|force-reload}"
+               exit 2
  esac
 -exit $?
-+exit $RETVAL
++exit $retval
index 21885133393b440bc3f8a6ea7c7eb871e05fdfde..1200c6ad0bebc488f755a3641a4c1c4ba8ef5636 100644 (file)
@@ -2,12 +2,12 @@
 Summary:       Shared storage lock manager
 Summary(pl.UTF-8):     Zarządca blokad dla współdzielonego składowania danych
 Name:          sanlock
-Version:       2.4
+Version:       2.5
 Release:       1
 License:       LGPL v2+ (libsanlock_client, libwdmd), GPL v2 (libsanlock, utilities)
 Group:         Networking
 Source0:       https://fedorahosted.org/releases/s/a/sanlock/%{name}-%{version}.tar.gz
-# Source0-md5: 5d056f13f1bec99c858867910b557380
+# Source0-md5: d89e5f22f4b2b4c08fcc9af74949647a
 Patch0:                %{name}-link.patch
 Patch1:                %{name}-init-pld.patch
 URL:           https://fedorahosted.org/sanlock/
This page took 0.102377 seconds and 4 git commands to generate.