Skip to content

Commit fa83c2d

Browse files
ecashinGreg KH
authored andcommitted
[PATCH] aoe 4/12: handle distros that have a udev rules
handle distros that have a udev rules file instead of dir Signed-off-by: Ed L. Cashin <ecashin@coraid.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent b68650f commit fa83c2d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Documentation/aoe/udev-install.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ fi
2323
# /etc/udev/rules.d
2424
#
2525
rules_d="`sed -n '/^udev_rules=/{ s!udev_rules=!!; s!\"!!g; p; }' $conf`"
26-
test "$rules_d" && sh -xc "cp `dirname $0`/udev.txt $rules_d/60-aoe.rules"
26+
if test -z "$rules_d" || test ! -d "$rules_d"; then
27+
echo "$me Error: cannot find udev rules directory" 1>&2
28+
exit 1
29+
fi
30+
sh -xc "cp `dirname $0`/udev.txt $rules_d/60-aoe.rules"

0 commit comments

Comments
 (0)