Need a script to change value in the Local Hostname

Help! Want to change the Local Hostname because DynamicDNS has mess up 250 machines. Any ideas???????
I need a UNIX script to to change the Value of
/library/preference/SystemConfiguration/preferences.plist
<key>LocalHostName</key>
<string>Value</string>
in Apple Remote Desktop.
I think you use the grep command
G5 Mac OS X (10.4.6) Mac OS X 10.3.9

Hi CIO,
   Perl will perform the moving of files for you for free but otherwise, awk is completely up to the task and to my thinking easier to use. This assumes that the property list is text which isn't a good assumption. If the property list is binary, you would need plutil to convert it. Anyway, here's my script:
cat /Library/Preferences/SystemConfiguration/preferences.plist | awk '{ if ( $0 ~ /<key>LocalHostName<\/key>/ ) { print; getline; sub(/<string>[^>*<\/string>/,"<string>New Value</string>"); print } else { print } }' > temp.plist
mv /Library/Preferences/SystemConfiguration/preferences.plist .
mv temp.plist /Library/Preferences/SystemConfiguration/preferences.plist
The "mv" lines above will doubtless require superuser privileges.
Gary
~~~~
   teamwork, n.:
      Having someone to blame.

Similar Messages

  • How to catch an event when the user change values in the project information dialog

    hi,
    i would like to know how to catch an event in my C# code when the user change values in the project information dialog?
    taskChange doesn't catch these changes.
    thanks.
    Thanks, Sharon.

    You need to write save button event handler for project information dialog. Link is having same functionality described. 
    http://blogs.msdn.com/b/husainzgh/archive/2011/08/01/hooking-into-the-project-detail-page-ribbon-save-button-without-overriding-out-of-box-functionality-in-project-web-access-for-project-server-2010.aspx
    http://www.projectserver2010blog.com/2010/01/sharepoint-2010-webpart-client-server.html
    kirtesh

  • Wlst script to change values for Logging.

    Hi,
    i am trying to write a wlst script to change attributes for the following.( i am new to wlst scripting)
    For all servers in a domain,
    Logging --> General --> Check Limit number of retained files
    --> Files to retain to different number.
    --> Log file Severity Level
    --> Standard out Severity Level
    --> Demain log broadcaster Severity level
    --> Memory Buffer Severity Level
    Logging --> HTTP --> Check Limit number of retained files
    --> Files to retain to different number.
    I was able to figure out the path for some of the attributes in Logging --> General.
    wls:/wl9xdomain/serverConfig/Servers/AdminServer/Log/AdminServer>
    wls:/wl9xdomain/serverConfig/Servers/AdminServer/Log/ManagedServer1>
    Can you help in finding the paths for above attributes.
    And this is the sample script i wrote, and succeded in changing "Files to retain to different number" in Logging --> General.
    connect('weblogic','weblogic','t3://localhost:7001')
    edit()
    startEdit()
    cd('/Servers/AdminServer/Log/AdminServer')
    set('FileCount',10)
    validate()
    save()
    activate()
    disconnect()
    exit()
    Thanks,
    Krishna.
    Edited by: user2656687 on Apr 15, 2009 4:46 PM

    Thanks for the response. I was able to figure out that access.log file attributes are in /Servers/AdminServer/WebServer/AdminServer/WebServerLog/AdminServer.
    And now i trying change script to apply for all the servers.
    when i use for loop it is failing. any thougts on it. may i know the syntax in this case..
    connect('weblogic','weblogic','t3://localhost:7001')
    edit()
    startEdit()
    cd('/Servers/AdminServer/Log/AdminServer')
    cmo.setNumberOfFilesLimited(true)
    cmo.setFileCount(100)
    cmo.setDomainLogBroadcastSeverity('Warning')
    cmo.setMemoryBufferSeverity('Warning')
    cmo.setLogFileSeverity('Warning')
    cmo.setStdoutSeverity('Warning')
    cd('/Servers/AdminServer/WebServer/AdminServer/WebServerLog/AdminServer')
    cmo.setNumberOfFilesLimited(true)
    cmo.setFileCount(100)
    save()
    activate()
    Thanks,
    Krishna.

  • How do I use pots on my client machine to change values, from the field, on my server machine and all other client machines?

    I am using Lookout 4.5, build 12, and I am having a problem concerning pots. I have data tables created for the different size sewer stations my system monitors. For each station, there are setpoints for starting and stopping of the pumps. I want to be able to change the setpoints for a station on the client file using a pot and have it change on all other machines running Lookout. I did this in 3.8 using DDE, but I don't want to use DDE anymore.
    I created a pot on the client file and URL'ed it to a pot on the server. On the server I created a table with a generic member "A" named "Lead Setp" and then created a member "A1" named
    "C5_1LeadSetp" then a member "A2" named "C3_1LeadSetp" and so on....
    In this table I connected the generic member "A" to the Pot I created on the server, and I connected A1 to its corresponding setpoint signal coming in from the field.
    On the client file I connected (in the table similar to the one on the server but with all signals for the station) the "A1" member to the setpoint signal coming in from the field, and I connected the "A" member to the Pot I created on the client file which is URL'ed to the pot on the server file.
    But, when I change the value of the pot on the client file, only the pot on the server and the "A" member in the table on the server change to the value of the pot on the client. The "A1" member whose screen I am changing the values from on the client does not change! This is the last thing I have to do and my file will be completely converted to 4.0. Does anyone have any ideas?
    Thanks for any responses..
    GBWY
    Jason
    Jason Phillips

    Hi Jason,
    If I understood your task correctly, you want to change the Setpoints on the Server DataTable using Pots from different clients. And also reflect these changes on the clients locally.
    You correctly remoted the Pots on the Clients to the corresponding Pots on the Server. However, you do not need tables on your clients. All you need is Expressions on each client to the particular cell of the Clients.
    So, to summarize: On the Server, the Pots write to the DataTable. And since the Pots on the Clients are remoted to these Pots on the Server, you can affect any change using these Pots. Because of the common remote source (Server Pots, i.e.) all of these Pots will always be in sync. Finally, to get the Setpoints on the Clients, just insert Expressio
    ns to the Server's DataTable.
    I am attaching a simple example (exmpl.zip) which does this. There are three processes -- My_Server, My_Client1, and My_Client2. I had them setup on the same machine so the paths are all process relative, but you can always change those to computer relative or absolute and move the client processes to diff machines.
    Hope this helps.
    Rgds,
    Khalid
    Attachments:
    exmpl.zip ‏12 KB

  • Not able to get changed values in the SAVE EVENT in ServHPartnerDet view

    Hi Experts,
    I am new CRM WEB IC, i have requirement like need to access four IBASE fields from BupaIbaseDetail and need to display those fiedls in ServHPartnerDet view. I am able display the fields and its values in the target view. But when user press change button and changes those four fields and press save button not able get the changed values in to the SAVE EVENT.Anyone please help me in this.
    IBHEADER , IBASEADDRESS  are the CONTEXT NODE CREATED in target view. I have binded IBHEADER to CuCoIbase custom controller and getting four fields data from IBASEADDRESS. below is the code for CREATE_CONTEXT_NODES.
    METHOD create_ibaseaddress.
      DATA:
        model        TYPE REF TO if_bsp_model,
        coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
        entity       TYPE REF TO cl_crm_bol_entity,              "#EC *
        entity_col   TYPE REF TO if_bol_entity_col.             "#EC *
      model = owner->create_model(
          class_name     = 'ZL_CRM_IC_SERVHPDET_CN00'
          model_id       = 'IBaseAddress' ).                    "#EC NOTEXT
      ibaseaddress ?= model.
      CLEAR model.
      coll_wrapper =
        ibheader->get_collection_wrapper( ).
    TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        TRY.
            entity_col = entity->get_related_entities(
                            iv_relation_name = 'FirstLevelComponent' ).
          CATCH cx_crm_genil_model_error.
        ENDTRY.
        TRY.
            entity ?= entity_col->get_current( ).
          CATCH cx_sy_move_cast_error.
        ENDTRY.
        CLEAR entity_col.
        IF entity IS BOUND.
          TRY.
              entity_col = entity->get_related_entities(
                              iv_relation_name = 'ComponentAddress' ).
              ibaseaddress->set_collection( entity_col ).
            CATCH cx_crm_genil_model_error.
          ENDTRY.
        ENDIF.
      ENDIF.
    ENDMETHOD.

    Code i have written in the CREATE_CONTEXT_NODE method for my custom context nodes( IBHEADER,IBASEADDRESS).
    this  CREATE_IBHEADER some data related to IBASE header then from this reading the IBASEADDRESS contextnode fields for displaying in the ServHPartnerDet. It is working fine but After changing the four fields values in the ServHPartnerDet view and trying to save, then context is not reading the new values it gives the old values only.
      TRY.
          lr_coll_wr = ztyped_context->ibaseaddress->get_collection_wrapper( ).
          IF lr_coll_wr IS BOUND.
            lr_entity ?= lr_coll_wr->get_current( ).
          ENDIF.
        CATCH cx_crm_genil_model_error.
      ENDTRY.
      CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
        EXPORTING
          iv_attr_name = 'BUILDING'
        IMPORTING
          ev_result    = lw_building.
    the building has got result of old value no the new value.
    method CREATE_IBHEADER.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_CRM_IC_SERVHPDET_CN01'
            model_id       = 'IBHEADER' ). "#EC NOTEXT
        IBHEADER ?= model.
        CLEAR model.
    bind to custom controller
      DATA:
          cuco TYPE REF TO cl_crm_ic_cucoibase_impl,
          cnode TYPE REF TO cl_bsp_wd_context_node.
      cuco ?= owner->get_custom_controller(
            'CuCoIbase' ).                                      "#EC NOTEXT
      cnode ?=
        cuco->typed_context->ibaseheader.
      coll_wrapper = cnode->get_collection_wrapper( ).
      ibheader->set_collection_wrapper( coll_wrapper ).
    endmethod.

  • Need to place a variable value at the end of report heading in BI 7

    Dear All,
    We have to place a variable value at the end of the report heading and the value should get refreshed whenever we change the variable by using "Change Variable Value". I have created a macro and the value will get triggered unless and until we click on any where on a sheet. But, we want to automate this one by using a macro.
    Ex: Quarterly TA Host Country Details As Of "Variable Date" Variable is created on TA Date characteristic. User can enter date on Pop up window box at the time of changing a variable TA Date. We need changed date at the end of the Report heading Qua----
    Please suggest me on how to place variable value at the end of report heading by using a macro.

    No need to use Macro. You can use text variable.
    Goto the Query Description and click on the Text variable icon.
    Create a text variable of processing type as REPLACEMENT PATH and replace it with the characteristic for which you have a ready for input variable that will be eneter by the user.
    This will populate the text variable with the value entered by teh user.
    Use this text variabkle along with the Query Description. So your description will look something like REPORT_TITLE&TXT_VAR&
    Hope this helps.

  • How to change values in the form?

    Hi guys,
    I am working on a small JSP project. I have a form in a page. It has several textboxes getting inputs from the user. In the JSP code, I want to change the value of the textbox based on the some condition in the JSP code:
    <form ... action="the same page">
    <input type="text name="theTextBox" value="" ...>
    <%
    if (javaObject.changeTextMethod() == true)
    //I want to change the value of the textbox to something else here, I can't say theTextBox.value="whatever"
    %>
    If I create a form again, I have to write the same code many times. Is there anyway that I can reuse the form code and just change the values of the textbox?
    Thanks in advance!
    ~Ji

    Hi,
    Thanks!
    But when I try javascript. It seems in JSP code, the javacript function cannot be seen.
    <SCRIPT language=javascript>
    function change()
         tBoxName.value="newValue";
    </SCRIPT>
    <%
    if (condtion == true)
    change(); // The error is: change() is not defined.
    %>
    Also, if the textbox is insice <form> </form>, in javascript function, the textbox cannot be seen either. Would you please tell me how exactly to use javascript in this situation? Thanks a lot!
    ~Ji

  • Not able to change values in the Property Inspector

    Hello!
    Can some one please help me with this. I was working in
    Director when I noticed that all of a sudden I wasn't able to
    change the values in the property inspector, specifially the sprite
    properties such as the x and y coordinates and the width and
    height. I'll type in a value and then I will get an error sound and
    it will revert to the previous value. How can I fix this??
    Thanks!

    Hi Ringerz,
    I've seen the PI lock up sometimes. What usually works is to
    switch to List Viw
    Mode. Never have trouble there. Then, close Director and
    reopen. Think it's jus a
    bug that hasn't been fixed yet.
    regards
    Dean
    Director Lecturer / Consultant / Director Enthusiast
    http://www.fbe.unsw.edu.au/learning/director
    http://www.multimediacreative.com.au
    email: [email protected]

  • Changing values in the design_dialog component doesn't reflect in other pages

    Hi All,
    I have created a design_dialog component and I included the component in some pages (browse page, product page,...). Whenever I make changes in the component in the browse page the changes is not reflecting in the other page (product page) i.e. the design dialog component, even though both the pages are sharing the same component. However the changes are available in different product pages like product page A, product page B but not in the browse page.
    Is there any way that I can make this component globally across the site, so if I change something in the design dialog component of browse page, the other page which has the same component should gets updated.
    Thanks
    CQ Beginner

    Hi,
    Design dialog changes will be applied to all the pages which are created using the same template. it wont apply if you are dropping the same component on the page which is created from differnet tempalte. That means it is at template level not at the site level.
    If you want to maintain some thing at the global level; which should apply to all the pages wherever you dropped this component irrespective of which template it uses you need to do small tweak.
    When you author any component through its dialog it stored the data by creating node on the page node --- that means it is applied to that page only
    When you author any component through its design dialog then it stores data in etc/designs/<your-site-name>/etct etct --- that mean it applied to all the pages which uses this design
    Change the path of the component so that it stores data at global level. then it should apply across your site.

  • How to refresh the table after change value in the VO programatically?

    Hi,
    I like to update my table by using a popup. My problem is that the table does not refresh after I change the value in the table's VO by the popup.
    There is another table in the popup, and the popup is triggered by a command button. An af:showPopupBehavior is nested in the button. The method of the button in backing bean is as following,
    public void accountcodeButtonClicked(DialogEvent dialogEvnt) {
    ViewObject volisttable=am.getAcChartValidateView1();
    String nowcode=volisttable.getCurrentRow().getAttribute("Code").toString();
    ViewObject vobasetable=am.getGlDetailView1();
    vobasetable.getCurrentRow().setAttribute("AccountCode",nowcode);
    The partialTrigger of the base table's column AccountCode points to the triggering button.
    I do not know why the base does not refresh after the above method is executed.
    Please me.
    Stephen

    Hi,
    kind of a shame that after so many years of ADF the message that updates should be through the binding layer hasn't gone through ;-)
    You change the underlying business service, which doesn't impact the binding layer the way you do it. So here is what you can try in the same order
    - 1. RequestContext.getCurrentInstance().addPartialTarget(<table reference>)
    - 2. If 1. doesn't show the changed data, try and re-execute the iterator that is the base of the table. If this works then the effect you see is caused because you ignore using the binding layer
    Frank

  • Changing values in the web report

    Hi All,
    For ex. I have the following scenario.
    I have a web report in which I have a table item which is displaying the query result. The user wants to have a facility to change the Key Figs, if they want, directly on the report, it means when the user runs the web report and if he says something to be changed, he will directly change the value on the report and will click something like a button to save the changed value back in the infoprovider.
    Is this something possible?I came to know that we can do this sort of things using BSP but I am not sure how to make the table item to accept some changes and how to link to a BSP Program.
    Could some one please help me in this..
    Best Regards,
    Nene.

    Nene,
    If you want to know if it is possible , here's how...
    1. Use a BPS layout ...
    2. Create a BSP layout for the same
    option 2 :
    Create a BSP page which has a textbox for accepting the value and a submit button.
    On clicking the submit button , based on the parameters selected by the user , update the ODS. Remember you cannot update the cube because it does not have overwrite capability. However , declare the cube as an export datasource and then call the function module for the data source and push in the data for the same inside the BSP page.
    Hope this helps..
    Arun
    Assign points if useful
    Message was edited by: Arun Varadarajan

  • I need help with Active Content running in the local machine

    Hey. I'm in a dead line ... and I'm in trouble: I programmed
    a web-site with a flash-menu that uses getURL to connect with the
    pages. This web work in the internet but doesn't in the local
    machine. I need to distribute it in a CD also, so i need the menu
    working in the local machine. I'd tried all the tricks i found in
    internet but....no success. Any suggestion....Thanks a lot.

    quote:
    I could make suggestion, but honestly ... I'm afraid I'll
    only say
    something you've already seen! I mean, *all* the tricks on
    the Internet?
    lol That's a lot. Have you tried inserting the "mark of the
    web" on the
    HTML page that contains the SWF?
    http://msdn.microsoft.com/en-us/library/ms537628(VS.85).aspx
    In Dreamweaver, see Commands > Insert Mark of the Web.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."
    Of course I did. Anyway, in theory it will work only in
    Explorer, but i have the same problem with the other navigators.
    The problem is very simple: if I publish de flash-menu for
    ACCESS LOCAL FILES ONLY I resolve the problem, but i lost the GET
    variables than I'm using for trace the option selected in the menu
    to mark it in the next page. In the other hand, if i publish for
    ACCESS NETWORK ONLY simply the menu doesn´t work in a local
    machine in any of the navigators.
    I'm desperately seeking Su...sorry, Solution. (lol)

  • How can i get rid of the "local" hostname sufix?

    i am installing Sun Grid Engine on 4 macpros, but this hostname problem is making the progress a headache.
    the cluster tries to resolve hostnames without the "local" sufix, and t fails.
    how can i completely remove the "local" suffix on my hostname??
    i have tried byt no sucess, this is what i did
    at the moment if i type "hostname" i get this
    mac-pro-3.local
    so i modified /etc/hosts and added a line
    myNetworkIP mac-pro-3.local mac-pro-3
    it works but only for the same machine, other macs cannot ping or resolve "mac-pro-3".
    i dont know what option is there available.
    macs are with Leopard 10.5.6
    any ideas?
    thanks in advance
    Cristobal

    i found another solution, and now i dont have the need to remove the "local" suffix
    i edited the /etc/hosts file and added what the computer was trying to resolve from the server, with an alias.
    #this line
    ipAddress mac-pro-3.local mac-pro-3

  • Need a script to change the start time of meetings set by someone else...

    Hello,
    I have a series of events that someone else created and the start time is off by 1 hour in my timezone. Is there a script available to run and change these times or do I have to delete them and manually create them myself?

    What I ended up doing John is just simply deleting the original events from iCal then I went in to Outlook and manually changed the start/stop times of each event then went into the IMAP Calendar folder, clicked on that event and added it to my iCal. Thats sort of the process I use for getting my events to from Exchange to iCal anyway (can't wait for Snow Leopard) but that did the trick for me for these few items that were off. Fortunately I don't expect any changes from the author.
    Thanks for responding!
    JimN

  • Need a script to change attribute of all images from not printable to printable

    Hi everyone,
    I have a couple of books with contain numerous images. These images are al set to not printable. Now the publisher wants to print books himself so images should be printable. Anyone have a script to automate this?
    thanx in advance

    Hi,
    Use this JS codes.  It will change the all non printable images into printable.
    var allGRs = app.activeDocument.allGraphics;
    var a = allGRs.length;
    while (a--) {
        if (allGRs[a].itemLayer.printable == false) {
                allGRs[a].itemLayer.printable = true;
    I hope this helps to you.

Maybe you are looking for

  • Purchased albums not showing up in the library

    Two newly purchased albums will sync to my phone, but they dont show up the the library on my computer. What do i do?

  • Annoying copyPixels problem, please help

    Hi I have a problem using copyPixels command. My task is following: 1) I have an image castmember with an png imported, that contains some number of image objects (for example 10 letters). This image has alpha channels 2) I need to create another ima

  • Static Credit Checks - Open orders - Confirmed quantity vs total quantity

    We are using static credit checks. Credit currently only sees open orders with a confirmed quanitity. Customer orders 10 items we have 5 in stock. Credit check runs, credit is evaluated basd on the confirmed open quanitity of 5. The order gets a cred

  • Passing a method call to a facelet tag

    Hello, I am trying to create a JSF confirmation box that replaces the Javascript confirm() function. I am using Seam and Rich Faces 3.2.1. The confirm box is a facelet tag that pops up a modal box with 'cancel' and a 'continue' buttons. Everything is

  • Flat File Reconciliation Issue

    Hi All, I am trying to achieve the flat file reconcilation. For that, I created a GTC connector with following configuration Staging Directory (Parent identity data):  /home/GTC Archiving Directory: /home/GTC/archive File Prefix: PLC Specified Delimi