2 # A simple tool for adding an initscript via the PLCAPI. I couldn't find the
3 # obvious way to do this through the PL interface, so I wrote this utility to
6 # It takes two command line parameters: an initscript name and the contents of
10 # addinitscript.py foo "echo test"
22 # get PL account settings from config module
23 pl_auth = get_pl_auth()
25 # connect to planetlab
28 shell = remoteshell.RemoteShell()
31 shell = PLC.Shell.Shell(globals = globals())
37 print "syntax: addinitscript.py name value"
44 fields['enabled'] = True
46 fields['script'] = value
47 shell.AddInitScript(pl_auth, fields)
49 if __name__ == "__main__":