blob: 7f44b03ef1f55f017ca41fd57ac01018d3026d9a (
plain)
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
34
|
KERNEL_VERSION='2.6.38-ARCH'
post_install() {
depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
VMXNET="install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;"
VMXNET="$VMXNET /sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;"
VMXNET="$VMXNET /bin/true;"
echo ">>> Enabling vmxnet driver in /etc/modprobe.d/modprobe.conf"
echo ">>> (this will disable pcnet32 driver)"
sed "$ a \\\n#VMware net driver\n$VMXNET" -i /etc/modprobe.d/modprobe.conf
echo
echo ">>>"
echo ">>> If vmxnet driver doesn't handle your NIC, you have to manually"
echo ">>> disable loading of pcnet32 driver by blacklisting it in /etc/rc.conf."
echo ">>>"
}
post_upgrade() {
depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
}
post_remove() {
depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
echo ">>> Disabling vmxnet driver in /etc/modprobe.d/modprobe.conf"
sed "/VMware net driver/,+1 d" -i /etc/modprobe.d/modprobe.conf
echo ">>>"
echo ">>> Remember to un-blacklist pcnet32 driver in /etc/rc.conf."
echo ">>>"
}
|