#!/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/SiliconImage3124u.kext /System/Library/Extensions
sudo chmod 755 /System/Library/Extensions/SiliconImage3124u.kext/Content 
sudo chmod 755 /System/Library/Extensions/SiliconImage3124u.kext/Contents/MacOS 
sudo chmod 644 /System/Library/Extensions/SiliconImage3124u.kext/Contents/MacOS/SiliconImage3124u 
sudo chmod 644 /System/Library/Extensions/SiliconImage3124u.kext/Contents/Info.plist 
sudo chmod 644 /System/Library/Extensions/SiliconImage3124u.kext/Contents/version.plist 
sudo chown -R root:wheel /System/Library/Extensions/SiliconImage3124u.kext 
sudo touch /System/Library/Extensions
sudo kextload  -v 3 /System/Library/Extensions/SiliconImage3124u.kext 
#sudo kextcache -e
sudo rm -rf /tmp/SiliconImage3124u.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
