]> git.pld-linux.org Git - packages/lvm2.git/blob - lvm2-pld_init.patch
- fix conditional
[packages/lvm2.git] / lvm2-pld_init.patch
1 --- LVM2.2.02.181/scripts/blk_availability_init_red_hat.in.orig 2018-08-02 08:18:51.000000000 +0200
2 +++ LVM2.2.02.181/scripts/blk_availability_init_red_hat.in      2018-09-07 20:43:11.884952342 +0200
3 @@ -1,4 +1,4 @@
4 -#!/bin/bash
5 +#!/bin/sh
6  #
7  # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
8  #
9 @@ -29,7 +29,7 @@
10  # Short-Description: Availability of block devices
11  ### END INIT INFO
12  
13 -. /etc/init.d/functions
14 +. /etc/rc.d/init.d/functions
15  
16  script=blkdeactivate
17  
18 @@ -41,16 +41,20 @@
19  case "$1" in
20    start)
21         touch "$LOCK_FILE"
22 +       exit 0
23         ;;
24  
25    stop)
26 -       action "Stopping block device availability:" "$sbindir/$script" $options
27 +       run_cmd "Stopping block device availability:" "$sbindir/$script" $options
28         rm -f "$LOCK_FILE"
29 +       exit 0
30         ;;
31  
32    status)
33 +       exit 0
34         ;;
35    *)
36 -       echo $"Usage: $0 {start|stop|status}"
37 +       msg_usage "$0 {start|stop|status}"
38 +       exit 3
39         ;;
40  esac
41 --- LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in.orig  2018-08-02 08:18:51.000000000 +0200
42 +++ LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in       2018-09-07 21:12:38.944932161 +0200
43 @@ -1,4 +1,4 @@
44 -#!/bin/bash
45 +#!/bin/sh
46  #
47  # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
48  #
49 @@ -60,7 +60,14 @@
50         VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix="  "}' 2> /dev/null`
51         for vg in $VGSLIST
52         do
53 -           action "Starting monitoring for VG $vg:" "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix="  "}' $vg || ret=$?
54 +           msg_starting "monitoring for VG $vg:"; busy
55 +           "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix="  "}' $vg
56 +           ret=$?
57 +           if [ $ret -ne 0 ]; then
58 +               fail
59 +               return $ret
60 +           fi
61 +           ok
62         done
63  
64         return $ret
65 @@ -78,7 +85,14 @@
66         VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix="  "}' 2> /dev/null`
67         for vg in $VGSLIST
68         do
69 -           action "Stopping monitoring for VG $vg:" "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix="  "}' $vg || ret=$?
70 +           msg_stopping "monitoring for VG $vg:"; busy
71 +           "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix="  "}' $vg
72 +           ret=$?
73 +           if [ $ret -ne 0 ]; then
74 +               fail
75 +               return $ret
76 +           fi
77 +           ok
78         done
79         return $ret
80  }
81 @@ -127,7 +141,7 @@
82         ;;
83  
84    *)
85 -       echo $"Usage: $0 {start|stop|restart|status|force-stop}"
86 +       msg_usage "$0 {start|stop|restart|status|force-stop}"
87         ;;
88  esac
89  
90 --- LVM2.2.02.181/scripts/blk_availability_systemd_red_hat.service.in.orig      2018-09-07 20:29:42.941628244 +0200
91 +++ LVM2.2.02.181/scripts/blk_availability_systemd_red_hat.service.in   2018-09-07 21:28:09.498254872 +0200
92 @@ -6,7 +6,7 @@
93  
94  [Service]
95  Type=oneshot
96 -ExecStart=/usr/bin/true
97 +ExecStart=/bin/true
98  ExecStop=@SBINDIR@/blkdeactivate -u -l wholevg -m disablequeueing -r wait
99  RemainAfterExit=yes
100  
101 --- LVM2.2.02.186/scripts/lvm2_lvmpolld_init_red_hat.in.orig    2019-09-23 21:36:48.727591492 +0200
102 +++ LVM2.2.02.186/scripts/lvm2_lvmpolld_init_red_hat.in 2019-09-23 21:39:51.961644240 +0200
103 @@ -1,4 +1,4 @@
104 -#!/bin/bash
105 +#!/bin/sh
106  #
107  # Copyright (C) 2015 Red Hat, Inc. All rights reserved.
108  #
109 @@ -33,7 +33,7 @@
110  #                    Also avoids unsolicited termination due to external factors.
111  ### END INIT INFO
112  
113 -. /etc/init.d/functions
114 +. /etc/rc.d/init.d/functions
115  
116  DAEMON=lvmpolld
117  
118 @@ -53,14 +53,15 @@
119  start()
120  {
121         ret=0
122 -       action "Starting LVM poll daemon:" "$sbindir/$DAEMON" || ret=$?
123 +       run_cmd "Starting LVM poll daemon:" "$sbindir/$DAEMON" || ret=$?
124         return $ret
125  }
126  
127  stop()
128  {
129         ret=0
130 -       action "Signaling LVM poll daemon to exit:" killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
131 +       msg_stopping "LVM poll daemon"
132 +       killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
133         return "$ret"
134  }
135  
136 @@ -80,7 +80,7 @@
137         [ $rtrn = 0 ] && rm -f "$LOCK_FILE"
138         ;;
139  
140 -  restart)
141 +  restart|force-reload)
142         if stop
143         then
144                 start
145 @@ -105,7 +107,7 @@
146         ;;
147  
148    *)
149 -       echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
150 +       msg_usage "$0 {start|stop|force-stop|restart|force-reload|condrestart|try-restart|status}"
151         ;;
152  esac
153  
This page took 0.047849 seconds and 3 git commands to generate.