|
|
Remote mounting of disk images without logged in local user
We remotely install stuff like this all the time but haven't
figured out how to hide it from the user yet. Here's a sample
script that installs Java 1.4.1:
#!/bin/sh # # 5/7/03 - Install Java 1.4.1 # COLLDIR="insert directory here that contains java 1.4.1 dmg file)" # Change the current user to root (UID=0) disktool -c 0 || exit 1 hdiutil mount $COLLDIR/Java1.4.1.dmg || exit 1 installer -pkg '/Volumes/Java 1.4.1 Update/Java1.4.1.pkg' - target / || exit 1 DEV=`/sbin/mount | grep '/Volumes/Java 1.4.1 Update' | cut - d" " -f1` || exit 1 hdiutil detach $DEV || exit 1 # hmm...installer seems to chmod g+w / which breaks sendmail. chmod g-w / || exit 1 exit 0The macosxhints editor is causing truncation of the commands in the script so you will need to do some editing (grrr). You can also use this technique with typical "drag and drop" installs using the "ditto -rsrsFork" command. The frustrating this is that some vendors release binary installers (i.e. no convenient .pkg or .dmg files) so you have to install them and then figure out what files it installed, then create a .dmg after the fact. Is there a better way? One other gotcha is that some installers (e.g. QuickTime 6.2) insist on popping up windows in Aqua for you to click which frustrates us remote installers. I suppose that an AppleScript would solve the problem but I haven't be ventured into that territory yet. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|