Home Forums Software InstaDMG Creating a Location

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #374519
    robmorton
    Participant

    Does anyone know a means to create a new location via the command line? We do not use DHCP, but I want to leave the Automatic location in tact and just configure the DNS information and search domain. Any thoughts?

    #374526
    Greg Neagle
    Participant

    Chris Adams wrote a nice little Python tool (using PyObjC binding):

    http://code.google.com/p/pymacadmin/source/browse/trunk/bin/create-location.py

    -Greg

    #375773
    mleacy
    Participant

    This looks interesting, but not being well versed in python, I don’t know where to put the new location’s name in this script.

    Anybody able to give a little direction?

    Thanks!

    #375780
    paulaust
    Participant

    I have been searching for this very thing for the last several months and found a tool just this week that has promise. Check out ncutil. http://turin.nss.udel.edu/ncutil/ It was created by Dr Jeffrey Frey of the University of Delaware. I was able to use this in a script along with scselect and network setup to create two new network locations, configure the proxy settings for one, switch to the preferred location and destroy the Automatic location. I haven’t yet included the script in a package to add to my image, but should have that knocked out shortly.

    hope this helps.

    #375787
    AllanMarcus
    Participant

    [QUOTE][u]Quote by: paulaust[/u][p]I have been searching for this very thing for the last several months and found a tool just this week that has promise. Check out ncutil. http://turin.nss.udel.edu/ncutil/ It was created by Dr Jeffrey Frey of the University of Delaware. I was able to use this in a script along with scselect and network setup to create two new network locations, configure the proxy settings for one, switch to the preferred location and destroy the Automatic location. I haven’t yet included the script in a package to add to my image, but should have that knocked out shortly.
    [/p][/QUOTE]

    ncutil has been around for a while. What worries me about it is that it has not been updated in over a year. I don’t know what will happen to it when Snow Leopard comes out.

    I looked at the python script and it basically just copies the automatic location and names the copy what you would like. You then can use existing tools to make this new location the active location and modify it. The downside is that you will interrupt existing network which you make the changes. I don’t know if that can be done in a payloadless post action script.

    Apple really needs to have an API to create a location and configure it.

    -Allan

    #375798
    mleacy
    Participant

    One of the folks on the Apple boards mentioned that scutil is capable of doing this. Does that make sense to anyone here?

    #375816
    AllanMarcus
    Participant

    open terminal
    type: man scutil

    scutil cannot create a location.

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

Comments are closed