2005-04-17 06:20:36 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# set aoe to autoload by installing the
|
2012-03-31 04:37:16 +08:00
|
|
|
# aliases in /etc/modprobe.d/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2012-03-31 04:37:16 +08:00
|
|
|
f=/etc/modprobe.d/aoe.conf
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
if test ! -r $f || test ! -w $f; then
|
|
|
|
echo "cannot configure $f for module autoloading" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
grep major-152 $f >/dev/null
|
|
|
|
if [ $? = 1 ]; then
|
|
|
|
echo alias block-major-152 aoe >> $f
|
|
|
|
echo alias char-major-152 aoe >> $f
|
|
|
|
fi
|
|
|
|
|