summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 11:46:03 +0100
committerJes Sorensen <jsorensen@fb.com>2018-07-31 11:43:14 -0400
commit18552ef041221d79a30c69d22bc2b68f1c216e97 (patch)
treedfe4bc94bb8436401b358b54ecbf06daa88e7981
parent80d1256e98b4995b0a753678f6c7e4a8bb369741 (diff)
downloadmdadm-18552ef041221d79a30c69d22bc2b68f1c216e97.tar.gz
udev.rules: make safe timeouts compatible with split-usr systems.
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>
-rw-r--r--udev-md-raid-safe-timeouts.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/udev-md-raid-safe-timeouts.rules b/udev-md-raid-safe-timeouts.rules
index 420c862..13c23d8 100644
--- a/udev-md-raid-safe-timeouts.rules
+++ b/udev-md-raid-safe-timeouts.rules
@@ -55,7 +55,7 @@ ACTION=="add|change", \
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"