18 lines · bash
1#!/bin/sh2# set aoe to autoload by installing the3# aliases in /etc/modprobe.d/4 5f=/etc/modprobe.d/aoe.conf6 7if test ! -r $f || test ! -w $f; then8 echo "cannot configure $f for module autoloading" 1>&29 exit 110fi11 12grep major-152 $f >/dev/null13if [ $? = 1 ]; then14 echo alias block-major-152 aoe >> $f15 echo alias char-major-152 aoe >> $f16fi17 18