From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- .../open-vm-tools-modules.install | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 community/open-vm-tools-modules/open-vm-tools-modules.install (limited to 'community/open-vm-tools-modules/open-vm-tools-modules.install') diff --git a/community/open-vm-tools-modules/open-vm-tools-modules.install b/community/open-vm-tools-modules/open-vm-tools-modules.install new file mode 100644 index 000000000..19c60c520 --- /dev/null +++ b/community/open-vm-tools-modules/open-vm-tools-modules.install @@ -0,0 +1,35 @@ +KERNEL_VERSION='2.6.37-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 ">>>" +} + -- cgit v1.2.3-54-g00ecf