To support MODULES_LOADED_ON_BOOT systemd requires to carry a patch for yet another distribution specific hack. remove this variable and migrate all users to the distribution-agnostic modules-load.d(5) --- etc/sysconfig.kernel-mkinitrd | 10 ---------- mkinitrd.spec | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/etc/sysconfig.kernel-mkinitrd b/etc/sysconfig.kernel-mkinitrd index 89062a8..a958c2a 100644 --- a/etc/sysconfig.kernel-mkinitrd +++ b/etc/sysconfig.kernel-mkinitrd @@ -31,16 +31,6 @@ NO_KMS_IN_INITRD="no" # DOMU_INITRD_MODULES="xennet xenblk" -## Type: string -## ServiceRestart: boot.loadmodules -# -# This variable contains the list of modules to be loaded -# once the main filesystem is active -# You will find a few default modules for hardware which -# can not be detected automatically. -# -MODULES_LOADED_ON_BOOT="" - ## Type: string ## Default: "" # diff --git a/mkinitrd.spec b/mkinitrd.spec index cebf70e..916fc66 100644 --- a/mkinitrd.spec +++ b/mkinitrd.spec @@ -157,6 +157,22 @@ install -m 644 etc/purge-kernels.service $RPM_BUILD_ROOT/%{_unitdir}/ %service_add_post purge-kernels.service %endif + +if [ -f /etc/sysconfig/kernel ]; then + . /etc/sysconfig/kernel + if [ -n "$MODULES_LOADED_ON_BOOT" ]; then + for m in $MODULES_LOADED_ON_BOOT ; do + if [ ! -f "/etc/modules-load.d/$m.conf" ]; then + tmpf=$(mktemp) || exit 1 + echo $m > $tmpf + mv $tmpf /etc/modules-load.d/$m.conf + fi + done + fi +fi + +%{remove_and_set -n kernel MODULES_LOADED_ON_BOOT} + %postun %insserv_cleanup %if 0%{?suse_version} >= 1210 -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org