#!/bin/sh

# ************
#
# Driver Installation
#
# Package Maker will place files into the tmp directory.
# The following command will copy the file and assign appropriate permissions
#
sudo scp -r /tmp/SiliconImage3132.kext /System/Library/Extensions
sudo chmod 755 /System/Library/Extensions/SiliconImage3132.kext/Content 
sudo chmod 755 /System/Library/Extensions/SiliconImage3132.kext/Contents/MacOS 
sudo chmod 644 /System/Library/Extensions/SiliconImage3132.kext/Contents/MacOS/SiliconImage3132 
sudo chmod 644 /System/Library/Extensions/SiliconImage3132.kext/Contents/Info.plist 
sudo chmod 644 /System/Library/Extensions/SiliconImage3132.kext/Contents/version.plist 
sudo chown -R root:wheel /System/Library/Extensions/SiliconImage3132.kext 
sudo kextload /System/Library/Extensions/SiliconImage3132.kext 
sudo kextcache -e 
#sudo kextcache -K /System/Library/Extensions/SiliconImage3132.kext
sudo rm -rf /tmp/SiliconImage3132.kext

# *************
#
# SiCoreService Installation
#
# 
sudo cp -f /tmp/10_4u/SiCoreService /usr/sbin/
sudo cp -rf /tmp/StartupItems/SiCoreService /Library/StartupItems/.
sudo chmod -R 755 /usr/sbin/SiCoreService
sudo chmod -R 755 /Library/StartupItems/SiCoreService
sudo chown -R root:wheel /usr/sbin/SiCoreService
sudo chown -R root:wheel /Library/StartupItems/SiCoreService
sudo rm -rf /tmp/10_4u
sudo rm -rf /tmp/StartupItems
sudo /Library/StartupItems/SiCoreService/SiCoreService start
