Unnamed repository
mkdumprd call dracut to rebuilding kdump initrd, sometimes passing extra dracut args is helpful. For example user can enable debug output with --debug, --printsize to print roughly increased initramfs size by each module, --omit-drivers to omit kernel modules, etc. This patch enables dracut_args option for passing extra args to dracut. Also it modifies add_dracut_arg() to treat a string with-in quote as single string because for dracut options which has its own args, the args need to be quoted and space seperated. If add_dracut_arg() gets an string read from kdump.conf and if that string contains double quotes, then while converting to positional parameters those double quotes are not interpreted. Hence if /etc/kdump.conf contains following. dracut_args --add-drivers "driver1 driver2" then add_dracut_args() sees following positional parameters $1= --add-drivers $2= "driver1 $3= driver2" Notice, double quotes have been ignored and parameters have been broken based on white space. Modify add_dracut_arg() to look for parameters starting with " and if one is found, it tries to merge all the next parameters till one is found with ending double quote. Hence effectively simulating following behavior. $1= --add-drivers $2= "driver1 driver2" [v1->v2]: address quoted substring in dracut_args, also handle the leading and ending spaces in substring. [v2->v3]: fix dracut arguments seperator in kdump.conf. [v3->v4]: improve changelog, thanks vivek. [v4->v5]: make the manpage more verbose [vivek]. Tested with below dracut_args test cases: 1. dracut_args --add-drivers "pcspkr virtio_net" --omit-drivers "sdhci-pci hid-logitech-dj e1000" 2. dracut_args --add-drivers " pcspkr virtio_net " --omit-drivers "sdhci-pci hid-logitech-dj e1000" Signed-off-by: Dave Young <dyoung@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> |
||
|---|---|---|
| po | ||
| .gitignore | ||
| 98-kexec.rules | ||
| dracut-kdump.sh | ||
| dracut-module-setup.sh | ||
| dracut-monitor_dd_progress | ||
| firstboot_kdump.py | ||
| kdump.conf | ||
| kdump.conf.5 | ||
| kdump.init | ||
| kdump.service | ||
| kdump.sysconfig | ||
| kdump.sysconfig.i386 | ||
| kdump.sysconfig.ia64 | ||
| kdump.sysconfig.ppc64 | ||
| kdump.sysconfig.s390x | ||
| kdump.sysconfig.x86_64 | ||
| kdumpctl | ||
| kexec-kdump-howto.txt | ||
| kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch | ||
| kexec-tools-2.0.3-disable-kexec-test.patch | ||
| kexec-tools.spec | ||
| mkdumprd | ||
| mkdumprd.8 | ||
| rhcrashkernel-param | ||
| sources | ||
| zanata-notes.txt | ||