[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] pygrub: extra_args to the front



Good day.

We've done following change in our XCP installation, I think it can be useful for others (and may be to upstream).

It change order of "extra_args" appending - instead joining to 'internal' VM kernel args this patch add them to the front.

Rationale: if user make some (unbootable) error inside VM (f.e. make a mistake in 'root' option) it can change it via PV-args of virtual machine (instead xe-edit-bootloader). This allows us to provide 'failsafe' services to customer without administrator interaction. Linux do have very simple behavior: if option repeated, first value used.


--- /usr/bin/pygrub.old    2012-02-20 17:55:22.000000000 +0400
+++ /usr/bin/pygrub    2012-02-20 17:56:01.000000000 +0400
@@ -753,7 +753,7 @@
         if chosencfg["args"] == None:
             chosencfg["args"] = extra_args
         else:
-            chosencfg["args"] += " " + extra_args
+            chosencfg["args"] = extra_args +  " " + chosencfg["args"]

     if not_really:
         bootcfg["kernel"] = "<kernel:%s>" % chosencfg["kernel"]


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.