From: Thierry Parmentelat Date: Fri, 3 Apr 2009 16:45:22 +0000 (+0000) Subject: - refactored marc's kupdate.sh into a new script kvariant.sh X-Git-Tag: PLCAPI-4.3-5~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=06ea74f924fac116f2d89ea77b979dcdf6c7abef;p=plcapi.git - 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 --- diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index e2d1ebf..374a0b1 100644 --- a/PLC/Methods/GetBootMedium.py +++ b/PLC/Methods/GetBootMedium.py @@ -107,11 +107,15 @@ class GetBootMedium(Method): - 'partition' - for USB actions only - 'cramfs' - 'serial' or 'serial:' - - 'no-hangcheck' console_spec (or 'default') is passed as-is to bootcd/build.sh 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 + - 'no-hangcheck' Security: - Non-admins can only generate files for nodes at their sites. @@ -333,6 +337,8 @@ class GetBootMedium(Method): type += "_cramfs" if "serial" in build_sh_spec: build_sh_options += " -s %s"%build_sh_spec['serial'] + if "variant" in build_sh_spec: + build_sh_options += " -V %s"%build_sh_spec['variant'] for karg in build_sh_spec['kargs']: build_sh_options += ' -k "%s"'%karg @@ -414,6 +420,8 @@ class GetBootMedium(Method): build_sh_spec['serial']='default' elif option.find("serial:") == 0: build_sh_spec['serial']=option.replace("serial:","") + elif option.find("variant:") == 0: + build_sh_spec['variant']=option.replace("variant:","") elif option == "no-hangcheck": build_sh_spec['kargs'].append('hcheck_reboot0') else: