#!/bin/bash
if  [ -e "$3"System/Library/Extensions/IONetworkingFamily.kext/Contents/Plugins/AppleYukon2.kext/Contents/Info.plist ]
then
	if grep GE1000 "$3"System/Library/Extensions/IONetworkingFamily.kext/Contents/Plugins/AppleYukon2.kext/Contents/Info.plist ; then
		echo "driver already patched"
		exit 1
	else
		"$1"/Contents/Resources/patchInfo "$3"System/Library/Extensions/IONetworkingFamily.kext/Contents/Plugins/AppleYukon2.kext/Contents/Info.plist\
		> /tmp/Info.plist
		cp /tmp/Info.plist "$3"System/Library/Extensions/IONetworkingFamily.kext/Contents/Plugins/AppleYukon2.kext/Contents/Info.plist
		rm /tmp/Info.plist
		touch "$3"System/Library/Extensions
		exit 0
	fi
else
	echo "unable to find AppleYukon2 driver to patch"
	exit 1
fi

