n = api.GetNodes(hostname)
filename = "bootcd/" + hostname + ".txt"
if not os.path.exists(filename) or force:
n = api.GetNodes(hostname)
filename = "bootcd/" + hostname + ".txt"
if not os.path.exists(filename) or force:
f.write( api.AdmGenerateNodeConfFile(n[0]['node_id']) )
f.close()
print os.system("cd bootcd; ./build.sh -f %s.txt -t iso -o /plc/data/var/www/html/bootcds/%s.iso &> /dev/null" % ( hostname, hostname))
f.write( api.AdmGenerateNodeConfFile(n[0]['node_id']) )
f.close()
print os.system("cd bootcd; ./build.sh -f %s.txt -t iso -o /plc/data/var/www/html/bootcds/%s.iso &> /dev/null" % ( hostname, hostname))
print os.system("cd bootcd; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname))
else:
# assume that the images have already been generated..
print os.system("cd bootcd; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname))
else:
# assume that the images have already been generated..
- args['url_list'] = " http://monitor.planet-lab.org/bootcds/%s-partition.usb\n" % hostname
- args['url_list'] += " http://monitor.planet-lab.org/bootcds/%s.iso" % hostname
+ args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (config.MONITOR_HOSTNAME, hostname)
+ args['url_list'] += " http://%s/bootcds/%s.iso" % (config.MONITOR_HOSTNAME, hostname)
- args['url_list'] = " http://monitor.planet-lab.org/bootcds/%s-partition.usb\n" % hostname
- args['url_list'] += " http://monitor.planet-lab.org/bootcds/%s.iso" % hostname
+ args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (config.MONITOR_HOSTNAME, hostname)
+ args['url_list'] += " http://%s/bootcds/%s.iso" % (config.MONITOR_HOSTNAME, hostname)
parser.set_defaults(media='both', force=False)
parser.add_option("", "--media", dest="media", metavar="usb, iso, both",
help="""Which media to generate the message for.""")
parser.add_option("", "--force", dest="force", action="store_true",
help="""Force the recreation of the usb images.""")
parser.set_defaults(media='both', force=False)
parser.add_option("", "--media", dest="media", metavar="usb, iso, both",
help="""Which media to generate the message for.""")
parser.add_option("", "--force", dest="force", action="store_true",
help="""Force the recreation of the usb images.""")