Skip to content

Commit 5e03e05

Browse files
committed
Do not clobber initialize method
There was a method named initialize defined and implemented differently in the dracut modules kiwi-lib and kiwi-repart. kiwi-lib is expected to be shared code across all kiwi dracut modules. However if one module redefines a method of the same name which is used in another module and expected to work differently there, this is evil. This commit cleans up the name conflict and names the kiwi library init function as lib_initialize. All dracut code that is expected to make use of this method has been adopted too.
1 parent 3a9c464 commit 5e03e05

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dracut/modules.d/90kiwi-dump/kiwi-dump-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ function get_remote_image_source_files {
513513
#--------------------------------------
514514
setup_debug
515515

516-
initialize
516+
lib_initialize
517517

518518
udev_pending
519519

dracut/modules.d/99kiwi-dump-reboot/kiwi-dump-reboot-system.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
type initialize >/dev/null 2>&1 || . /lib/kiwi-lib.sh
2+
type lib_initialize >/dev/null 2>&1 || . /lib/kiwi-lib.sh
33
type report_and_quit >/dev/null 2>&1 || . /lib/kiwi-dump-image.sh
44
type get_selected_disk >/dev/null 2>&1 || . /lib/kiwi-dump-image.sh
55
type run_dialog >/dev/null 2>&1 || . /lib/kiwi-dialog-lib.sh
@@ -73,7 +73,7 @@ function boot_installed_system {
7373
#======================================
7474
# Reboot into system
7575
#--------------------------------------
76-
initialize
76+
lib_initialize
7777

7878
if getargbool 0 rd.kiwi.ramdisk; then
7979
# For ramdisk deployment a kexec boot is not possible as it

dracut/modules.d/99kiwi-lib/kiwi-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function bool {
203203
fi
204204
}
205205

206-
function initialize {
206+
function lib_initialize {
207207
# """
208208
# Source profile variables into runtime environment
209209
# The method will exit from the initrd if the profile

0 commit comments

Comments
 (0)