Home Forums Software InstaDMG Flag/switches/createuser.py usage question, and a launchd scripting discussion

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #378108
    Allister Banks
    Participant

    Hey Folks,

    After hearing the advisement to use RAID 0x, I’ve striped two eSATA 7200 drives and put the instaDMG directory on an Intel SSD, since its optimized for sequential reads. I’d like to put the shadow file on the RAID since that’s what I’m writing too, am I correct that it would be:
    [code]-t /Volumes/RAID0[/code]
    ?
    Also, how do I use CreateUser.py instead of CreateUser.pkg? Currently I put the ARD kickstart command at the end of the postflight included with Mr. Atkins & co.’s package so I can reference $shortname when my USERDATA changes.

    Does -n set the restored volume name, default being InstaDMG? As a side note I use a self-removing script called by launchd post first user login to change the HostName like so:
    [code]# set names based on en0 (ethernet) mac address
    LAST6_ENETADDY=`ifconfig en0 | grep ether | awk ‘{print $2}’ | sed ‘s/://g’ | cut -c 7-12 | tr [:lower:] [:upper:]`
    $SCUTIL –set LocalHostName “Imaged-10.6.2-$LAST6_ENETADDY”
    $SCUTIL –set ComputerName “Imaged-10.6.2-$LAST6_ENETADDY”
    $SCUTIL –set HostName “Imaged-10.6.2-$LAST6_ENETADDY”
    [/code]
    I’m not sure why /usr/sbin/networksetup(to disable firewire, turn off airport and ipv6) and scutil weren’t working as part of RunAtLoad(whereas systemsetup to set time/zone/ntp, diskutil to rename the volume based on HD size, and launchctl to startup ssh, all work as called by RunAtLoad), so I used watchpaths for when the user home dir for my admin gets created. As part of the watchpaths-called script I’ve even copied a configured com.apple.dock.plist into place as part of the same script and bumped(killall Dock) it to have the preference show up successfully.
    I’ve slipped these scripts/launchd plists into the mostly-empty ClearRegistration package. All this plus BigHonkingText makes it feel particularly slick(when it works!)

    Thanks, Allister Banks

    POINT http://www.pointconsultants.comĀ 646.502.4708 368 Broadway Ste. 303 New York, New York 10013

    #378111
    larkost
    Participant

    1) Yes, your usage of the “-t” flag looks right. That will make the “temp” directory which mostly just contains the shadow file on that volume.

    2) CreateUser.py is a ways out from being useful at this point. I am still writing it, and the version I put in the development branch is just there for safety. It is going to take a bit of work, and some changes in InstaDMG before that is ready to go, and I am being a little schizophrenic in what sub-projects I am working on right now. So there is a bunch of stuff on the burner, but nothing is ready to go yet. I guess I just need a conference to focus me… *sigh*.

    3) Yes, “-n” sets the volume name.

    3.5) Just as a scripting exercise, you don’t need to use grep, awk, sed, cut, and tr to do the job:
    [code]ifconfig en0 | awk ‘BEGIN { FS = “:”} /ether/ { print toupper($4 $5 $6) }'[/code]
    Yes… you can do just about anything with awk.

    4) It could be that your script is running early enough that the network stack has not yet initialized. Three things to make sure of here:

    4a) You have already run “networksetup -detectnewhardware” to make sure that the system has detected the system hardware.

    4b) You are using ‘ipconfig waitall’ for these devices to actually connect and get IP address, etc….

    4c) You are using absolute paths to everything.

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

Comments are closed