Move all functions needed in the second kernel from kdump-lib.sh
to kdump-lib-initramfs.sh, and update shebang headers.
Now, kdump-lib-initramfs.sh is an independent lib script, no longer
depend on kdump-lib.sh, and kdump-lib.sh is no longer needed for
the second kernel.
In later commits, functions in kdump-lib-initramfs.sh will be reworked
to be POSIX compatible, kdump-lib.sh will contain bash only functions.
POSIX shell have very limited features, eg. `local` keyword doesn't
exist in POSIX but we rely on that heavily. So kdump-lib.sh will
use bash syntax and contain the most complex helper and codes.
kdump-lib-initramfs.sh will contain the minimum set of helpers,
and be shared by both the first and second kernel.
Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Philipp Rudo <prudo@redhat.com>
EditorConfig file is helpful for tools like `shfmt`, also could be a
hint for code styling.
The code style spec used in this new added .editorconfig file is
generated based on existing code style.
Following commits will make mkfadumprd, mkdumprd, kdumpctl, kdump-lib.sh,
and *-module-setup.sh only be used in first kernel, so use bash syntax
for these scripts. Other scripts will use sh syntax for better POSIX
compatibility.
Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Kairui Song <kasong@redhat.com>