]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
udev.rules: make safe timeouts compatible with split-usr systems.
authorDimitri John Ledkov <xnox@ubuntu.com>
Mon, 23 Jul 2018 10:46:03 +0000 (11:46 +0100)
committerJes Sorensen <jsorensen@fb.com>
Tue, 31 Jul 2018 15:43:14 +0000 (11:43 -0400)
Instead of /usr/bin/sh, and /usr/bin/echo, use /bin/sh and shell
built-in echo respectively. This makes
udev-md-raid-safe-timeouts.rules to be compatible with both usr-merged
and split-usr systems alike.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
udev-md-raid-safe-timeouts.rules

index 420c86265728fb832ada72496b353485f9c089ed..13c23d848077ef5e29846d9a3484574e9b38f99f 100644 (file)
@@ -55,7 +55,7 @@ ACTION=="add|change", \
   ENV{MD_LEVEL}=="raid[1-9]*", \
   TEST=="/sys/block/$parent/device/timeout", \
   TEST=="/usr/sbin/smartctl", \
   ENV{MD_LEVEL}=="raid[1-9]*", \
   TEST=="/sys/block/$parent/device/timeout", \
   TEST=="/usr/sbin/smartctl", \
-  PROGRAM!="/usr/bin/sh -c '/usr/sbin/smartctl -l scterc /dev/$parent | grep -q seconds && exit 0 || exit 1'", \
-  RUN+="/usr/bin/sh -c '/usr/bin/echo 180 > /sys/block/$parent/device/timeout && /usr/bin/logger timeout for /dev/$parent set to 180 secs'"
+  PROGRAM!="/bin/sh -c '/usr/sbin/smartctl -l scterc /dev/$parent | grep -q seconds && exit 0 || exit 1'", \
+  RUN+="/bin/sh -c 'echo 180 > /sys/block/$parent/device/timeout && /usr/bin/logger timeout for /dev/$parent set to 180 secs'"
 
 LABEL="md_timeouts_end"
 
 LABEL="md_timeouts_end"