blob: 815dff4691c946d38c0f472d072354a0cfe1ae44 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
2# set aoe to autoload by installing the
Lucas De Marchi970e2482012-03-30 13:37:16 -07003# aliases in /etc/modprobe.d/
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
Lucas De Marchi970e2482012-03-30 13:37:16 -07005f=/etc/modprobe.d/aoe.conf
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
7if test ! -r $f || test ! -w $f; then
8 echo "cannot configure $f for module autoloading" 1>&2
9 exit 1
10fi
11
12grep major-152 $f >/dev/null
13if [ $? = 1 ]; then
14 echo alias block-major-152 aoe >> $f
15 echo alias char-major-152 aoe >> $f
16fi
17