plistbuddy error: Integer: Unrecognized format

Discussion in 'Apple' started by rohit, Oct 13, 2006.

  1. rohit

    rohit Guest

    Dear All,

    Developing product for Mac OS X 10.3.x ppc,Mac OS X 10.4.x ppc and Mac
    OS X 10.4.x Intel and need your expert comments for the following
    issue:


    I am using "PLISTBUDDY utility" to add/edit a firewall entry for my
    product's Server through my script being run by my installer developed
    using Packagemaker. Below is the code to add and set the firewall
    entry; which works PERFECTLY FINE on Mac OS X 10.4.8 ppc and Intel but
    fails on Mac OS X 10.3.9 (also fails on previous versions of 10.3.9)

    ///////
    sudo chmod 777 /Library/Preferences/com.apple.sharing.firewall.plist
    defaults write "/Library/Preferences/com.apple.sharing.firewall"
    "firewall" -dict-add "My Server" '{ "Port" = (9001); }';

    $plistbuddy -c "add :firewall:My\\ Product\\ Server:enable Integer"
    /Library/Preferences/com.apple.sharing.firewall.plist

    $plistbuddy -c "set :firewall:My\\ Product\\ Server:enable 1"
    /Library/Preferences/com.apple.sharing.firewall.plist

    $plistbuddy -c "add :firewall:My\\ Product\\ Server:editable Integer"
    /Library/Preferences/com.apple.sharing.firewall.plist

    $plistbuddy -c "set :firewall:My\\ Product\\ Server:editable 0"
    /Library/Preferences/com.apple.sharing.firewall.plist

    sudo chmod 444 /Library/Preferences/com.apple.sharing.firewall.plist


    ///////
    On Mac OS X 10.3.x it shows folllowing error
    "Integer: Unrecognized format"
    but works well without any issues on 10.4.x ppc and intel.

    On further digging i saw that it is able to recognize dictionary,
    string, array but only fails to recognize "Integer". But To add the
    firewall port , I need to add Integer entry only.

    Can anybody please tell
    1) Why is the issue coming only on Mac OS X 10.3.9 ? Why not similiar
    issue on 10.4.x OS ?
    2) How to resolve the issue ? Is there any alternative method?
    3) Did anybody encountered similiar issue before also ? Please comment.

    Please send your valuable suggestions / comments /useful pointers.

    Thanks and Regards,
    Rohit Dhamija
     
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wally
    Replies:
    1
    Views:
    379
  2. cethiesus

    Unrecognized memory

    cethiesus, Oct 20, 2003, in forum: Shuttle
    Replies:
    0
    Views:
    384
    cethiesus
    Oct 20, 2003
  3. wolfgang schneider

    tiger mpx , memory unrecognized

    wolfgang schneider, Dec 17, 2005, in forum: Tyan
    Replies:
    4
    Views:
    731
    wolfgang schneider
    Dec 30, 2005
  4. Andy Fish
    Replies:
    3
    Views:
    390
    Andy Fish
    Aug 9, 2004
  5. news.columbus.rr.com
    Replies:
    6
    Views:
    478
    news.columbus.rr.com
    Aug 6, 2005
Loading...

Share This Page