Re: [PATCH] udev.rules: make safe timeouts compatible with split-usr systems.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/23/2018 06:46 AM, Dimitri John Ledkov wrote:
> 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@xxxxxxxxxx>
> ---
>  udev-md-raid-safe-timeouts.rules | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Neil, Xiao,

Can you confirm this won't break things for SuSE and Fedora, in
particular the initramfs, before I apply this?

Thanks,
Jes


> diff --git a/udev-md-raid-safe-timeouts.rules b/udev-md-raid-safe-timeouts.rules
> index 420c8626..13c23d84 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"
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux