View Single Post
  #2  
Old 05-25-2006, 09:48 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
This isn't a really easy thing to do, but given fixed paths, you could do something like:

Code:
#! /bin/sh
if [ -a /Volumes/A/System/Library/CoreServices/BootX ]; then
   UCHGSET=$(ls -lo /Volumes/A/System/Library/CoreServices/BootX | grep -vqF uchg; echo $?);
   chflags nouchg /Volumes/A/System/Library/CoreServices/BootX;
   bless -folder /Volumes/A/System/Library/CoreServices -save9 -label A -setBoot;

   if [ $UCHGSET -eq 1 ]; then
      chflags uchg /Volumes/A/System/Library/CoreServices/BootX;
   fi;

   echo "Successfully set A as startup disk";
else 
   echo "Could not set A as the startup disk because it does not contain a valid Mac OS X System Folder.";
   exit 1;
fi

nohup /bin/bash -c "sleep 10; /Applications/SuperDuper!.app/Contents/Resources/Scripts/restart.scpt"&
__________________
--Dave Nanian
Reply With Quote