blob: df2c77614e168c0091567123bbc6e497982b6b0b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/sh
if [ "$2" = "POST-INSTALL" ]; then
MODULENAME=dazuko
echo -n "Do you want load ${MODULENAME}.ko? [ y/n ]: "
read LOADMOD
echo
if [ x"${LOADMOD}" = x"y" ]; then
kldstat -n ${MODULENAME} > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -eq 0 ]; then
kldunload -f -n ${MODULENAME}
fi
kldload ${MODULENAME}
fi
echo -n "Do you want load ${MODULENAME}.ko on boot time? [ y/n ]: "
read BOOTMOD
echo
if [ x"${BOOTMOD}" = x"y" ]; then
cat /etc/rc.local | grep ${MODULENAME} > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -eq 0 ]; then
sed -i '' -e '/kldload ${MODULENAME}.*/d' /etc/rc.local
echo `which kldload` ${MODULENAME} >> /etc/rc.local
else
echo `which kldload` ${MODULENAME} >> /etc/rc.local
fi
fi
fi
exit 0
|