- This topic has 5 replies, 4 voices, and was last updated 16 years, 11 months ago by
Rusty Myers.
-
AuthorPosts
-
May 2, 2008 at 6:05 pm #372541
hermana
ParticipantI am trying to change certain system preferences in my image but when I it runs the postflight script for that package it seems to make those changes on the machine that I am creating the image and not the image itself. I have searched to find what I need in front of my commands to make those changes on image but have been unsuccessful. Here are two examples of some commands I want to change in system preferences:
#Turn On SSH
systemsetup -setremotelogin on#Turn off Sleep
systemsetup -setsleep never—
-Any help would be appreciatedMay 2, 2008 at 8:58 pm #372544Patrick Fergus
ParticipantTry these instead:
To enable ssh, in your CustomPKG postflight:
[code]defaults write $3/System/Library/LaunchDaemons/ssh Disabled -bool false[/code]It [i]could[/i] be done at startup time, but most of the time baking the option into the static ASR image is a good thing.
To disable sleep, MCX (WorkGroup Management) policy is best, but the following at the first startup (via a StartupItem or other method) of a freshly imaged machine works as well:
[code]/usr/bin/pmset -a sleep 0[/code]AFAIK, systemsetup and pmset both only can set settings on the startup disk.
– Patrick
May 3, 2008 at 8:24 pm #372551fender36
ParticipantHow about ARD? Will kickstart only affect the startup disk or can you run that in a postflight script?
May 4, 2008 at 1:01 am #372552Patrick Fergus
Participant[QUOTE][u]Quote by: fender36[/u]
>How about ARD? Will kickstart only affect the startup disk or can you run that in a postflight script?[/QUOTE]ARD’s kickstart can address non-boot volumes. Tack on “-targetdisk $3” onto your kickstart command options (it may need to be the first option after the path to kickstart–I have no proof of that except every example I’ve seen has -targetdisk listed first).
– Patrick
May 4, 2008 at 1:14 am #372553Rusty Myers
Participant[QUOTE][u]Quote by: fender36[/u][p]How about ARD? Will kickstart only affect the startup disk or can you run that in a postflight script?[/p][/QUOTE]
ARD kickstart command has to be run once the machine has booted. There is a clever launchd script that works well:
https://www.afp548.com/forum/viewtopic.php?forum=45&showtopic=19122&highlight=ard
I’ve also added my packagemaker project and scripts. I hope I’m not violating any copyrights in doing so…
http://rusty.isa-geek.org/files/ARDactivatelaunchd.zip
You’ll have to change the user name and the name of the launchd item, you should see in the script. Anyway, good luck!
May 4, 2008 at 1:15 am #372554Rusty Myers
Participant[QUOTE][u]Quote by: Patrick+Fergus[/u][p][QUOTE][u]Quote by: fender36[/u]
>How about ARD? Will kickstart only affect the startup disk or can you run that in a postflight script?[/QUOTE]ARD’s kickstart can address non-boot volumes. Tack on “-targetdisk $3” onto your kickstart command options (it may need to be the first option after the path to kickstart–I have no proof of that except every example I’ve seen has -targetdisk listed first).
– Patrick[/p][/QUOTE]
Oh, looks like I was wrong!
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed