X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=lvm2-tld_init.patch;fp=lvm2-tld_init.patch;h=6c6c82d05fd3ddc8464c7cb1041d8a8d55c9981a;hb=ba8c629f1eca8e931865aad3a1a8ceaf18e95a7c;hp=0000000000000000000000000000000000000000;hpb=9113f375a7e4c5dc6378afbc9ba833b129354c2e;p=packages%2Flvm2.git diff --git a/lvm2-tld_init.patch b/lvm2-tld_init.patch new file mode 100644 index 0000000..6c6c82d --- /dev/null +++ b/lvm2-tld_init.patch @@ -0,0 +1,166 @@ +diff -dur LVM2.2.02.107.orig/scripts/blk_availability_init_red_hat.in LVM2.2.02.107/scripts/blk_availability_init_red_hat.in +--- LVM2.2.02.107.orig/scripts/blk_availability_init_red_hat.in 2014-06-23 14:07:38.000000000 +0000 ++++ LVM2.2.02.107/scripts/blk_availability_init_red_hat.in 2014-07-25 16:24:42.989000000 +0000 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # Copyright (C) 2012 Red Hat, Inc. All rights reserved. + # +@@ -43,16 +43,20 @@ + case "$1" in + start) + touch $LOCK_FILE ++ exit 0 + ;; + + stop) +- action "Stopping block device availability:" $sbindir/$script $options ++ run_cmd "Stopping block device availability:" $sbindir/$script $options + rm -f $LOCK_FILE ++ exit 0 + ;; + + status) ++ exit 0 + ;; + *) +- echo $"Usage: $0 {start|stop|status}" ++ msg_usage "$0 {start|stop|status}" ++ exit 3 + ;; + esac +diff -dur LVM2.2.02.107.orig/scripts/blk_availability_systemd_red_hat.service.in LVM2.2.02.107/scripts/blk_availability_systemd_red_hat.service.in +--- LVM2.2.02.107.orig/scripts/blk_availability_systemd_red_hat.service.in 2014-06-23 14:07:38.000000000 +0000 ++++ LVM2.2.02.107/scripts/blk_availability_systemd_red_hat.service.in 2014-07-25 16:24:42.992000000 +0000 +@@ -6,7 +6,7 @@ + + [Service] + Type=oneshot +-ExecStart=/usr/bin/true ++ExecStart=/bin/true + ExecStop=@sbindir@/blkdeactivate -u -l wholevg + RemainAfterExit=yes + +diff -dur LVM2.2.02.107.orig/scripts/clvmd_init_red_hat.in LVM2.2.02.107/scripts/clvmd_init_red_hat.in +--- LVM2.2.02.107.orig/scripts/clvmd_init_red_hat.in 2014-06-23 14:07:38.000000000 +0000 ++++ LVM2.2.02.107/scripts/clvmd_init_red_hat.in 2014-07-25 16:24:42.989000000 +0000 +@@ -66,9 +66,8 @@ + start() + { + if ! rh_status_q; then +- echo -n "Starting $DAEMON: " ++ msg_starting "$DAEMON" + $DAEMON $CLVMDOPTS || return $? +- echo + fi + + # Refresh local cache. +@@ -88,7 +87,7 @@ + + ${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 + +@@ -113,27 +112,23 @@ + + [ -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 ++ rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish + + if rh_status_q; then +- echo -n "$DAEMON failed to exit" +- failure +- echo ++ fail + return 1 + else +- echo -n "$DAEMON terminated" +- success +- echo ++ ok + fi + + rm -f $LOCK_FILE +@@ -143,7 +138,7 @@ + + reload() { + rh_status_q || exit 7 +- action "Reloading $DAEMON configuration: " $DAEMON -R || return $? ++ run_cmd "Reloading $DAEMON configuration: " $DAEMON -R || return $? + } + + restart() { +@@ -154,7 +149,7 @@ + + # Try to get clvmd to restart itself. This will preserve + # exclusive LV locks +- action "Restarting $DAEMON: " $DAEMON -S ++ run_cmd "Restarting $DAEMON: " $DAEMON -S + + # If that fails then do a normal stop & restart + if [ $? != 0 ]; then +diff -dur LVM2.2.02.107.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.02.107/scripts/lvm2_monitoring_init_red_hat.in +--- LVM2.2.02.107.orig/scripts/lvm2_monitoring_init_red_hat.in 2014-06-23 14:07:38.000000000 +0000 ++++ LVM2.2.02.107/scripts/lvm2_monitoring_init_red_hat.in 2014-07-25 16:29:30.757000000 +0000 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved. + # +@@ -46,32 +46,29 @@ + + start() + { +- ret=0 ++ local config="'log{command_names=0 prefix=\" \"}'" + # TODO do we want to separate out already active groups only? +- VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null` ++ VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config $config 2> /dev/null` + for vg in $VGSLIST + do +- action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$? ++ run_cmd "Starting monitoring for VG $vg" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config $config $vg + done +- +- return $ret + } + + + stop() + { +- ret=0 ++ local config="'log{command_names=0 prefix=\" \"}'" + # TODO do we want to separate out already active groups only? + if test "$WARN" = "1"; then + echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override." + return 1 + fi +- VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null` ++ VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config ${config} 2> /dev/null` + for vg in $VGSLIST + do +- action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$? ++ run_cmd "Stopping monitoring for VG $vg" $VGCHANGE --monitor n --ignoreskippedcluster --config $config $vg + done +- return $ret + } + + rtrn=1