Path: blob/master/Documentation/admin-guide/aoe/udev-install.sh
26285 views
# install the aoe-specific udev rules from udev.txt into1# the system's udev configuration2#34me="`basename $0`"56# find udev.conf, often /etc/udev/udev.conf7# (or environment can specify where to find udev.conf)8#9if test -z "$conf"; then10if test -r /etc/udev/udev.conf; then11conf=/etc/udev/udev.conf12else13conf="`find /etc -type f -name udev.conf 2> /dev/null`"14if test -z "$conf" || test ! -r "$conf"; then15echo "$me Error: no udev.conf found" 1>&216exit 117fi18fi19fi2021# find the directory where udev rules are stored, often22# /etc/udev/rules.d23#24rules_d="`sed -n '/^udev_rules=/{ s!udev_rules=!!; s!\"!!g; p; }' $conf`"25if test -z "$rules_d" ; then26rules_d=/etc/udev/rules.d27fi28if test ! -d "$rules_d"; then29echo "$me Error: cannot find udev rules directory" 1>&230exit 131fi32sh -xc "cp `dirname $0`/udev.txt $rules_d/60-aoe.rules"333435