1*83bbf6e1SMauro Carvalho Chehab#!/bin/sh 2*83bbf6e1SMauro Carvalho Chehab# set aoe to autoload by installing the 3*83bbf6e1SMauro Carvalho Chehab# aliases in /etc/modprobe.d/ 4*83bbf6e1SMauro Carvalho Chehab 5*83bbf6e1SMauro Carvalho Chehabf=/etc/modprobe.d/aoe.conf 6*83bbf6e1SMauro Carvalho Chehab 7*83bbf6e1SMauro Carvalho Chehabif test ! -r $f || test ! -w $f; then 8*83bbf6e1SMauro Carvalho Chehab echo "cannot configure $f for module autoloading" 1>&2 9*83bbf6e1SMauro Carvalho Chehab exit 1 10*83bbf6e1SMauro Carvalho Chehabfi 11*83bbf6e1SMauro Carvalho Chehab 12*83bbf6e1SMauro Carvalho Chehabgrep major-152 $f >/dev/null 13*83bbf6e1SMauro Carvalho Chehabif [ $? = 1 ]; then 14*83bbf6e1SMauro Carvalho Chehab echo alias block-major-152 aoe >> $f 15*83bbf6e1SMauro Carvalho Chehab echo alias char-major-152 aoe >> $f 16*83bbf6e1SMauro Carvalho Chehabfi 17*83bbf6e1SMauro Carvalho Chehab 18