]> TLD Linux GIT Repositories - packages/lvm2.git/blobdiff - lvm2-tld_init.patch
- updated to 2.03.15
[packages/lvm2.git] / lvm2-tld_init.patch
index 66326de7e71a892ab57bfe0aa6c75f0f7d8e5f2a..83b42eb1e8a9728ad8ec65e39c2843f254f09f81 100644 (file)
@@ -1,6 +1,6 @@
-diff -urp LVM2.2.02.177.orig/scripts/blk_availability_init_red_hat.in LVM2.2.02.177/scripts/blk_availability_init_red_hat.in
---- LVM2.2.02.177.orig/scripts/blk_availability_init_red_hat.in        2017-12-18 20:44:35.000000000 +0000
-+++ LVM2.2.02.177/scripts/blk_availability_init_red_hat.in     2018-01-29 11:24:46.012906501 +0000
+diff -ur LVM2.2.03.02.orig/scripts/blk_availability_init_red_hat.in LVM2.2.03.02/scripts/blk_availability_init_red_hat.in
+--- LVM2.2.03.02.orig/scripts/blk_availability_init_red_hat.in 2019-03-22 17:01:45.758000000 +0100
++++ LVM2.2.03.02/scripts/blk_availability_init_red_hat.in      2019-03-22 17:01:58.006000000 +0100
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/bin/sh
@@ -44,217 +44,9 @@ diff -urp LVM2.2.02.177.orig/scripts/blk_availability_init_red_hat.in LVM2.2.02.
 +      exit 3
        ;;
  esac
-diff -urp LVM2.2.02.177.orig/scripts/clvmd_init_red_hat.in LVM2.2.02.177/scripts/clvmd_init_red_hat.in
---- LVM2.2.02.177.orig/scripts/clvmd_init_red_hat.in   2017-12-18 20:44:35.000000000 +0000
-+++ LVM2.2.02.177/scripts/clvmd_init_red_hat.in        2018-01-29 12:54:59.156583852 +0000
-@@ -4,7 +4,7 @@
- #
- # chkconfig: - 24 76
- # description: Cluster daemon for userland logical volume management tools.
--# pidfile: @CLVMD_PIDFILE@
-+# pidfile: /var/run/clvmd.pid
- #
- # For Red-Hat-based distributions such as Fedora, RHEL, CentOS.
- #
-@@ -18,15 +18,12 @@
- . /etc/rc.d/init.d/functions
--DAEMON=clvmd
-+DAEMON="clvmd"
--sbindir="@SBINDIR@"
--usrsbindir="@USRSBINDIR@"
--
--lvm_vgchange="$sbindir/vgchange"
--lvm_vgs="$sbindir/vgs"
--lvm_vgscan="$sbindir/vgscan"
--lvm_lvs="$sbindir/lvs"
-+lvm_vgchange="/sbin/vgchange"
-+lvm_vgs="/sbin/vgs"
-+lvm_vgscan="/sbin/vgscan"
-+lvm_lvs="/sbin/lvs"
- CLVMDOPTS="-T30"
-@@ -50,20 +47,11 @@ clustered_active_lvs() {
-       "$lvm_lvs" --noheadings -o lv_name -S 'vg_clustered=1 && lv_active!=""' 2>/dev/null
- }
--rh_status() {
--      status "$DAEMON"
--}
--
--rh_status_q() {
--      rh_status >/dev/null 2>&1
--}
--
- start()
- {
--      if ! rh_status_q; then
--              echo -n "Starting $DAEMON: "
--              "$usrsbindir/$DAEMON" $CLVMDOPTS || return $?
--              echo
-+      if ! status $DAEMON 1>/dev/null 2>&1; then
-+              msg_starting "$DAEMON"
-+              "$DAEMON" $CLVMDOPTS || return $?
-       fi
-       # Refresh local cache.
-@@ -82,74 +70,60 @@ start()
-       # unnecessary warnings.
-       "$lvm_vgscan" > /dev/null 2>&1
--
--      action "Activating VG(s):" "$lvm_vgchange" -aay $LVM_VGS || return $?
--
-+      run_cmd "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
-       touch "$LOCK_FILE"
--
-       return 0
- }
- wait_for_finish()
- {
-       count=0
--      while [ "$count" -le "$CLVMD_STOP_TIMEOUT" ] && \
--               rh_status_q ]; do
-+      while [ "$count" -le "$CLVMD_STOP_TIMEOUT" ] && status $DAEMON 1>/dev/null 2>&1 ; do
-               sleep 1
-               count=$((count+1))
-       done
--
--      ! rh_status_q
-+      ! status $DAEMON 1>/dev/null 2>&1
- }
- stop()
- {
--      rh_status_q || return 0
--
-+      status $DAEMON 1>/dev/null 2>&1 || return 0
-       [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
-       if [ -n "$LVM_VGS" ]; then
--              action "Deactivating clustered VG(s):" "$lvm_vgchange" -anl $LVM_VGS || return $?
-+              run_cmd "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
-       fi
--
--      action "Signaling $DAEMON to exit" kill -TERM "$(pidofproc "$DAEMON")" || return $?
-+      run_cmd "Signaling $DAEMON to exit" kill -TERM $(pidofproc "$DAEMON") || return $?
-       # wait half second before we start the waiting loop or we will show
-       # the loop more time than really necessary
-       usleep 500000
-       # clvmd could take some time to stop
--      rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
--
--      if rh_status_q; then
--              echo -n "$DAEMON failed to exit"
--              failure
--              echo
-+      status $DAEMON 1>/dev/null 2>&1 && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish
-+      if status $DAEMON 1>/dev/null 2>&1; then
-+              fail
-               return 1
-       else
--              echo -n "$DAEMON terminated"
--              success
--              echo
-+              ok
-       fi
--
-       rm -f "$LOCK_FILE"
--
-       return 0
- }
- reload() {
--      rh_status_q || exit 7
--      action "Reloading $DAEMON configuration: " "$usrsbindir/$DAEMON" -R || return $?
-+      status $DAEMON 1>/dev/null 2>&1 || exit 7
-+      run_cmd "Reloading $DAEMON configuration: " "$DAEMON" -R || return $?
- }
- restart() {
-       # if stop fails, restart will return the error and not attempt
--      # another start. Even if start is protected by rh_status_q,
-+      # another start. Even if start is protected by status call,
-       # that would avoid spawning another daemon, it would try to
-       # reactivate the VGs.
-       # Try to get clvmd to restart itself. This will preserve 
-       # exclusive LV locks
--      action "Restarting $DAEMON: " "$usrsbindir/$DAEMON" -S
-+      run_cmd "Restarting $DAEMON: " "$DAEMON" -S
-       # If that fails then do a normal stop & restart
-       if  [ $? != 0 ]; then
-@@ -166,38 +140,39 @@ restart() {
-       exit 4
- }
-+RETVAL=0
- # See how we were called.
- case "$1" in
-   start)
-       start
--      rtrn=$?
-+      RETVAL=$?
-       ;;
-   stop)
-       stop
--      rtrn=$?
-+      RETVAL=$?
-       ;;
-   restart|force-reload)
-       restart
--      rtrn=$?
-+      RETVAL=$?
-       ;;
-   condrestart|try-restart)
--      rh_status_q || exit 0
-+      status $DAEMON 1>/dev/null 2>&1 || exit 0
-       restart
--      rtrn=$? 
-+      RETVAL=$?
-       ;;
-   reload)
-       reload
--      rtrn=$?
-+      RETVAL=$?
-       ;;
-   status)
--      rh_status
--      rtrn=$?
--      if [ "$rtrn" = 0 ]; then
-+      status $DAEMON
-+      RETVAL=$?
-+      if [ $RETVAL = 0 ]; then
-               cvgs="$(clustered_vgs)"
-               echo Clustered Volume Groups: ${cvgs:-"(none)"}
-               clvs="$(clustered_active_lvs)"
-@@ -206,9 +181,9 @@ case "$1" in
-       ;;
-   *)
--      echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
--      rtrn=2
-+      msg_usage "$0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
-+      RETVAL=2
-       ;;
- esac
--exit $rtrn
-+exit $RETVAL
-diff -urp LVM2.2.02.177.orig/scripts/cmirrord_init_red_hat.in LVM2.2.02.177/scripts/cmirrord_init_red_hat.in
---- LVM2.2.02.177.orig/scripts/cmirrord_init_red_hat.in        2017-12-18 20:44:35.000000000 +0000
-+++ LVM2.2.02.177/scripts/cmirrord_init_red_hat.in     2018-01-29 11:28:49.069892013 +0000
+diff -ur LVM2.2.03.02.orig/scripts/cmirrord_init_red_hat.in LVM2.2.03.02/scripts/cmirrord_init_red_hat.in
+--- LVM2.2.03.02.orig/scripts/cmirrord_init_red_hat.in 2019-03-22 17:01:45.758000000 +0100
++++ LVM2.2.03.02/scripts/cmirrord_init_red_hat.in      2019-03-22 17:01:58.006000000 +0100
 @@ -2,7 +2,7 @@
  #
  # chkconfig: - 22 78
@@ -383,145 +175,9 @@ diff -urp LVM2.2.02.177.orig/scripts/cmirrord_init_red_hat.in LVM2.2.02.177/scri
  
 -exit $rtrn
 +exit $RETVAL
-diff -urp LVM2.2.02.177.orig/scripts/lvm2_lvmetad_init_red_hat.in LVM2.2.02.177/scripts/lvm2_lvmetad_init_red_hat.in
---- LVM2.2.02.177.orig/scripts/lvm2_lvmetad_init_red_hat.in    2017-12-18 20:44:35.000000000 +0000
-+++ LVM2.2.02.177/scripts/lvm2_lvmetad_init_red_hat.in 2018-01-29 11:30:04.229887533 +0000
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- #
- # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
- #
-@@ -33,78 +33,84 @@
- . /etc/init.d/functions
--DAEMON=lvmetad
-+DAEMON="lvmetad"
-+NAME="LVM metadata daemon"
--sbindir="@SBINDIR@"
--
--LOCK_FILE="@DEFAULT_SYS_LOCK_DIR@/subsys/$DAEMON"
--PID_FILE="@LVMETAD_PIDFILE@"
--
--rh_status() {
--      status -p "$PID_FILE" "$DAEMON"
--}
--
--rh_status_q() {
--      rh_status >/dev/null 2>&1
--}
-+LOCK_FILE="/var/lock/subsys/lvm2-lvmetad"
-+PID_FILE="/var/run/lvmetad.pid"
- start()
- {
--      ret=0
--      action "Starting LVM metadata daemon:" "$sbindir/$DAEMON" || ret=$?
--      return $ret
-+      if [ -f "$LOCK_FILE" ]; then
-+              msg_already_running "$NAME"
-+              return
-+      fi
-+      msg_starting "$NAME"
-+      daemon "/sbin/$DAEMON" </dev/null
-+      RETVAL=$?
-+      [ "$RETVAL" -eq 0 ] && touch "$LOCK_FILE"
- }
- stop()
- {
--      ret=0
--      action "Signaling LVM metadata daemon to exit:" killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
--      return $ret
-+      if [ ! -f "$LOCK_FILE" ]; then
-+              msg_not_running "$NAME"
-+              return
-+      fi
-+      msg_stopping "$NAME"
-+      killproc --pidfile "$PID_FILE" "$DAEMON"
-+      rm -f "$LOCK_FILE"
-+}
-+
-+condrestart() {
-+      if [ ! -f "$LOCK_FILE" ]; then
-+              msg_not_running "$NAME"
-+              RETVAL=$1
-+              return
-+      fi
-+      stop
-+      start
- }
--rtrn=1
-+reload() {
-+      if [ ! -f "$LOCK_FILE" ]; then
-+              msg_not_running "$NAME"
-+              RETVAL=7
-+              return
-+      fi
-+      msg_reloading "$NAME"
-+      killproc "$DAEMON" -HUP
-+      RETVAL=$?
-+}
-+RETVAL=0
- # See how we were called.
- case "$1" in
-   start)
--      rh_status_q && exit 0
-       start
--      rtrn=$?
--      [ "$rtrn" = 0 ] && touch "$LOCK_FILE"
-       ;;
--  stop|force-stop)
--      rh_status_q || exit 0
-+  stop)
-       stop
--      rtrn=$?
--      [ "$rtrn" = 0 ] && rm -f "$LOCK_FILE"
-       ;;
-   restart)
--      if stop
--      then
--              start
--      fi
--      rtrn=$?
-+      stop
-+      start
-       ;;
-   condrestart|try-restart)
--      rh_status_q || exit 0
--      if stop
--      then
--              start
--      fi
--      rtrn=$?
-+      condrestart 0
-       ;;
-   status)
--      rh_status
--      rtrn=$?
-+      status $DAEMON
-+      exit $?
-       ;;
-   *)
--      echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
-+      msg_usage "$0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
-       ;;
- esac
--exit $rtrn
-+exit $RETVAL
-diff -urp LVM2.2.02.177.orig/scripts/lvm2_lvmpolld_init_red_hat.in LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in
---- LVM2.2.02.177.orig/scripts/lvm2_lvmpolld_init_red_hat.in   2017-12-18 20:44:35.000000000 +0000
-+++ LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in        2018-01-29 11:31:12.405883470 +0000
+diff -ur LVM2.2.03.02.orig/scripts/lvm2_lvmpolld_init_red_hat.in LVM2.2.03.02/scripts/lvm2_lvmpolld_init_red_hat.in
+--- LVM2.2.03.02.orig/scripts/lvm2_lvmpolld_init_red_hat.in    2019-03-22 17:01:45.758000000 +0100
++++ LVM2.2.03.02/scripts/lvm2_lvmpolld_init_red_hat.in 2019-03-22 17:01:58.006000000 +0100
 @@ -1,6 +1,6 @@
 -#!/bin/bash
 +#!/bin/sh
@@ -668,9 +324,9 @@ diff -urp LVM2.2.02.177.orig/scripts/lvm2_lvmpolld_init_red_hat.in LVM2.2.02.177
  
 -exit $rtrn
 +exit $RETVAL
-diff -urp LVM2.2.02.177.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in
---- LVM2.2.02.177.orig/scripts/lvm2_monitoring_init_red_hat.in 2017-12-18 20:44:35.000000000 +0000
-+++ LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in      2018-01-29 11:33:20.925875809 +0000
+diff -ur LVM2.2.03.02.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.03.02/scripts/lvm2_monitoring_init_red_hat.in
+--- LVM2.2.03.02.orig/scripts/lvm2_monitoring_init_red_hat.in  2019-03-22 17:01:45.758000000 +0100
++++ LVM2.2.03.02/scripts/lvm2_monitoring_init_red_hat.in       2019-03-22 17:01:58.006000000 +0100
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/bin/sh