^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # set aoe to autoload by installing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # aliases in /etc/modprobe.d/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) f=/etc/modprobe.d/aoe.conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) if test ! -r $f || test ! -w $f; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) echo "cannot configure $f for module autoloading" 1>&2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) exit 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) grep major-152 $f >/dev/null
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) if [ $? = 1 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) echo alias block-major-152 aoe >> $f
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) echo alias char-major-152 aoe >> $f
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)