autoload.sh 343 Bytes
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2
#!/bin/sh
# set aoe to autoload by installing the
3
# aliases in /etc/modprobe.d/
Linus Torvalds's avatar
Linus Torvalds committed
4

5
f=/etc/modprobe.d/aoe.conf
Linus Torvalds's avatar
Linus Torvalds committed
6 7 8 9 10 11 12 13 14 15 16 17

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