Hi,
After i did this tutorial: http://wiki.awkwardtv.org/wiki/Take_2_Full_Update (with focus on paragraph 3.9.9) i wanted to automate things. Thats why i build a bootscirpt. Here is my bootscript.
Not anymore thanks to 'ash'.I still have to run it manually (ssh) because i can't get it to work at boot (when put in rc.local the TVComposite.kext does not work).
You can run bash / shell scripts from your ATV menu with iScript: http://wiki.awkwardtv.org/wiki/IScripts. This script works fine with iScript.
I post it here cause sometimes your looking for a particular script line and than these posts come in handy.
Commends are welcome. And if you know how to create a menu item to run this script plz post it here / pm me.
To run the bootscript remotely i use this:
on my mac / linux / iphone machine i run my /usr/bin/atv :hack::
and now the real thingCode:#!/bin/bash # made by cousinCocaine # RUN bootscript on server ssh -1 frontrow:frontrow@192.168.1.20 'sudo /usr/bin/bootscript' clear echo "AppleTV loaded the bootscript" echo "done" sleep 2 exit
i have this script saved in /usr/bin/bootscript :hack:
Code:#!/bin/sh # # ############################# # # bootscript made by cousinCocaine # # ############################# # # # ########################################################## # # this script runs all your none apple boot settings at once # # ########################################################## # # # SETUP # let the script fill in the root password # this is unsafe but makes it noob easy. PW="frontrow" # SMB MOUNTPOINTS # the name of the disk on the remote machine SMB_MOUNT_1="/KoekoekMedia" # the folder on the disk that contains your video files SMB_VIDEODIR_1="Videos" # ip address of the remote machine SMB_IP_1="192.168.1.10" # login on the remote machine (Airport Express likes everyone!) SMB_USER_1="frontrow" # password on remote machine (Airport Express wants the correct pw) SMB_PW_1="password" # START SCRIPT echo $PW | sudo -S echo "Starting $0" echo $PW | sudo -S date # Make disk RW accessible. Undo this at the bottom. echo $PW | sudo -S mount -uw / echo $PW | sudo -S touch /.readwrite echo $PW | sudo -S sync echo "Root directory is mounted with write acces." echo "" # We need to be able to load kext files echo $PW | sudo -S /sbin/turbo_kext_enabler.bin echo "Turbo's kext enabler loaded." echo "" # Load USB kext files echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/msdosfs.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/IOUSBMassStorageClass.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/AppleSMBIOS.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/IOStorageFamily.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/smbfs.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/udf.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/IOHDIXController.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/ntfs.kext echo "USB kextfiles loaded." echo "" # Load TVComposite kext file # Unload first: If the composite kext is loaded to early it does not work echo $PW | sudo -S /sbin/kextunload /System/Library/Extensions/TVComposite.kext echo $PW | sudo -S /sbin/kextload /System/Library/Extensions/TVComposite.kext echo "TVComposite kextfile loaded." echo "" # Mount SMB disks and create there mount points and symbolic links # Cleanup old mountpoints. echo $PW | sudo -S umount -f $SMB_MOUNT_1 echo $PW | sudo -S rm -rf $SMB_MOUNT_1 echo $PW | sudo -S mkdir $SMB_MOUNT_1 echo $PW | sudo -S chmod 755 $SMB_MOUNT_1 echo $PW | sudo -S chown frontrow:frontrow $SMB_MOUNT_1 echo "Old mountpoints are cleaned up." echo "" # Mount disks sudo mount -t smbfs //$SMB_USER_1:$SMB_PW_1@$SMB_IP_1$SMB_MOUNT_1 $SMB_MOUNT_1 echo "SMB Disks are mounted." echo "" # Create symbolic links echo $PW | sudo -S -u frontrow ln -s $SMB_MOUNT_1/$SMB_VIDEODIR_1/* /Users/frontrow/Movies/ echo "Symbolic links created." echo "" # Make disk Read only echo $PW | sudo -S rm /.readwrite echo $PW | sudo -S sync echo $PW | sudo -S mount -ur / echo "Root directory is mounted with read acces." echo "" # Leave a note to make shure we did run this script. echo $PW | sudo -S touch /Users/frontrow/loaded.txt echo $PW | sudo -S echo $0 "Loaded on:" `date` > /Users/frontrow/loaded.txt echo "Exiting $0" echo "" # end of file



LinkBack URL
About LinkBacks








Reply With Quote
Bookmarks