Commit 9e27e737 authored by Mike Hibler's avatar Mike Hibler

Allow user to specify -F to os_load to override any custom MBR on the disk.

This translates to -P on the backend. Without this option, a user has no way
to load a standard image on a node that currently has a custom MBR/image on it.
parent ebae78e5
......@@ -2391,6 +2391,11 @@ class experiment:
argstr += " -c "
pass
pass
elif opt == "force":
if xbool(val):
argstr += " -P "
pass
pass
pass
argstr += " -e "
......@@ -4019,6 +4024,11 @@ class node:
argstr += " -c "
pass
pass
elif opt == "force":
if xbool(val):
argstr += " -P "
pass
pass
pass
tokens = argdict["nodes"].split(",")
......
#! /usr/bin/env python
#
# Copyright (c) 2004-2014 University of Utah and the Flux Group.
# Copyright (c) 2004-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -404,7 +404,7 @@ class reload:
def apply(self):
try:
opts, req_args = getopt.getopt(self.argv, "i:p:m:sre:c",
opts, req_args = getopt.getopt(self.argv, "i:p:m:sre:cF",
[ "help" ]);
pass
except getopt.error, e:
......@@ -437,6 +437,9 @@ class reload:
elif opt == "-c":
params["usecurrent"] = "yes";
pass
elif opt == "-F":
params["force"] = "yes";
pass
elif opt == "-e":
pid,eid = string.split(val, ",")
params["proj"] = pid;
......@@ -472,6 +475,7 @@ class reload:
print " -m - Specify internal image id (instead of -i and -p)";
print " -r - Do *not* reboot nodes; do that yourself";
print " -c - Reload nodes with the image currently on them";
print " -F - Force; clobber any existing MBR/partition table";
print " -e - Reload all nodes in the given experiment";
print " node - Node to reload (pcXXX)";
wrapperoptions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment