pygrub: always append --args
authorOlaf Hering <olaf@aepfle.de>
Tue, 25 Sep 2012 10:03:51 +0000 (11:03 +0100)
committerOlaf Hering <olaf@aepfle.de>
Tue, 25 Sep 2012 10:03:51 +0000 (11:03 +0100)
commitc474b173ae8883c6beb2b8ea90694d594a5b1677
treeb22b9b0b6283a2ddf1c543dfc7964211f7f5e1be
parentca71bdf62e7e96579415fce6b562f3a956d94cc9
pygrub: always append --args

If a bootloader entry in menu.lst has no additional kernel command line
options listed and the domU.cfg has 'bootargs="--args=something"' the
additional arguments from the config file are not passed to the kernel.
The reason for that incorrect behaviour is that run_grub appends arg
only if the parsed config file has arguments listed.

Fix this by appending args from image section and the config file separatly.
To avoid adding to a NoneType initialize grubcfg['args'] to an empty string.
This does not change behaviour but simplifies the code which appends the
string.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/pygrub/src/pygrub