Home Forums Software InstaDMG Changing System Preferences

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #372541
    hermana
    Participant

    I 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 appreciated

    #372544
    Patrick Fergus
    Participant

    Try 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

    #372551
    fender36
    Participant

    How about ARD? Will kickstart only affect the startup disk or can you run that in a postflight script?

    #372552
    Patrick 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

    #372553
    Rusty 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!

    #372554
    Rusty 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!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Comments are closed