#!/bin/sh
pv=`/usr/bin/sw_vers -productVersion`
if [ "$2" == "/" ] ; then
case "$pv" in
10.3.*)
/usr/libexec/StartupItemContext /System/Library/Extensions/Maxon.kext/Contents/SharedSupport/MaxonAgent.app/Contents/MacOS/MaxonDaemon
/bin/sleep 1
/usr/bin/open /System/Library/Extensions/Maxon.kext/Contents/SharedSupport/MaxonAgent.app
/bin/sleep 1
/usr/bin/killall -HUP MaxonAgent 2> /dev/null
;;
10.4.*)
/usr/libexec/StartupItemContext /System/Library/Extensions/Maxon.kext/Contents/SharedSupport/MaxonAgent.app/Contents/MacOS/MaxonDaemon --install
/bin/sleep 1
/bin/launchctl load /Library/LaunchDaemons/au.com.maxon.daemon.plist
/usr/bin/open /System/Library/Extensions/Maxon.kext/Contents/SharedSupport/MaxonAgent.app
/bin/sleep 1
/usr/bin/killall -HUP MaxonAgent 2> /dev/null
;;
*)
/usr/libexec/StartupItemContext /System/Library/Extensions/Maxon.kext/Contents/SharedSupport/MaxonAgent.app/Contents/MacOS/MaxonDaemon --install
/bin/sleep 1
/bin/launchctl load /Library/LaunchDaemons/au.com.maxon.daemon.plist
/bin/launchctl load /Library/LaunchAgents/au.com.maxon.agent.plist
;;
esac
/sbin/kextload /System/Library/Extensions/Maxon.kext/Contents/PlugIns/* 2> /dev/null
fi
/usr/bin/touch $2System/Library/Extensions
if [ "$2" == "/" ] ; then
case "$pv" in
10.[34].*)
/usr/bin/killall -HUP kextd 2> /dev/null
;;
*)
;;
esac
fi
exit 0
--
Shaun Wexler
MacFOH
My software never has bugs. It just develops random features.