From b0335ff95e7421febd830250c46f47e86d3c97dd Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 3 Apr 2009 16:45:22 +0000 Subject: [PATCH] - refactored marc's kupdate.sh into a new script kvariant.sh - this allows to create a 'variant' stored in /usr/share/bootcd/ from the standard /usr/share/bootcd/build tree but with a different kernel - GetBootMedium has a new option to use a given variant --- PLC/Methods/GetBootMedium.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index a211030a..0051aa60 100644 --- a/PLC/Methods/GetBootMedium.py +++ b/PLC/Methods/GetBootMedium.py @@ -96,6 +96,10 @@ class GetBootMedium(Method): it is expected to be a colon separated string denoting tty - baudrate - parity - bits e.g. ttyS0:115200:n:8 + - 'variant:' + passed to build.sh as -V + variants are used to run a different kernel on the bootCD + see kvariant.sh for how to create a variant Security: - Non-admins can only generate files for nodes at their sites. @@ -297,6 +301,8 @@ class GetBootMedium(Method): optdict['serial']='default' elif option.find("serial:") == 0: optdict['serial']=option.replace("serial:","") + elif option.find("variant:") == 0: + optdict['variant']=option.replace("variant:","") else: raise PLCInvalidArgument, "unknown option %s"%option @@ -427,7 +433,8 @@ class GetBootMedium(Method): # make build's arguments serial_arg="" if "cramfs" in optdict: type += "_cramfs" - if "serial" in optdict: serial_arg = "-s %s"%optdict['serial'] + if "serial" in optdict: serial_arg += " -s %s"%optdict['serial'] + if "variant" in optdict: serial_arg += " -V %s"%optdict['variant'] log_file="%s.log"%node_image # invoke build.sh build_command = '%s -f "%s" -o "%s" -t "%s" %s &> %s' % (self.BOOTCDBUILD, -- 2.47.0