Bug#678973: mdadm: copy customized udev rules as well as system rules

Michael Tokarev mjt at tls.msk.ru
Mon Jun 25 12:55:23 UTC 2012


25.06.2012 15:47, Dmitrijs Ledkovs пишет:
>     # Copy udev rules, which udev no longer does
> -  mkdir -p $DESTDIR/lib/udev/rules.d/
> -  cp/lib/udev/rules.d/64-md-raid.rules $DESTDIR/lib/udev/rules.d/
> +  UDEV_RULE=64-md-raid.rules
> +  for rules_folder in /lib/udev/rules.d /etc/udev/rules.d; do
> +      if [ -f $rules_folder/$UDEV_RULE ]; then
> +	  mkdir -p $DESTDIR$rules_folder
> +	  cp $rules_folder/$UDEV_RULE $DESTDIR$rules_folder/$UDEV_RULE
> +      fi
> +  done

It is enough to copy first of /etc/udev, /lib/udev file, to ONE
place (either to /lib/udev or /etc/udev).  No need to copy both,
and generally, no need to use two (/etc/udev and /lib/udev) dirs
in initramfs.

/mjt






More information about the pkg-mdadm-devel mailing list