89f9350d9e
- Fix dmraid issue bnc#905746 A dracut_dmraid_use_udev.patch - Taken over from SLE12 A fips_add_aesni-intel.patch - Do not touch /run vs /var/run bnc#922676 D 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch - Update dracut to version 042 Remove these already included or unneeded patches: D dracut_v041_to_HEAD.patch D 0011-Correct-paths-for-openSUSE.patch D 0068-95fcoe-uefi-Test-for-EFI-firmware.patch D 0170-enable-logitech-hidpp.patch Adjust/refresh: M 0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch M 0016-Add-new-s390x-specific-rule-files.patch M 0017-45ifcfg-use-distro-specific-scripts.patch M 0019-40network-Fix-race-condition-when-wait-for-networks.patch M 0020-00warpclock-Set-correct-timezone.patch M 0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch M 0048-40network-Only-enable-network-interfaces-if-explicit.patch M 0053-01fips-fixup-loading-issues.patch M 0056-81cio_ignore-handle-cio_ignore-commandline.patch M 0057-01fips-Include-some-more-hmacs.patch M 0058-dracut-add-warning-when-including-unsupported-module.patch M 0059-99suse-Add-SUSE-specific-initrd-parsing.patch M 0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch M 0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch M 0066-40network-always-start-netroot-in-ifup.sh.patch M 0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch M 0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch OBS-URL: https://build.opensuse.org/request/show/314510 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=219
181 lines
5.3 KiB
Diff
181 lines
5.3 KiB
Diff
From 78329f4df2afc9fae11ea30dd11839d956d4af08 Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Fri, 27 Jun 2014 11:43:28 +0200
|
|
Subject: 91zipl: Add new module to update s390x configuration
|
|
|
|
Add new module to update the dracut commandline values
|
|
during booting with the values found in the file
|
|
dracut-cmdline.conf on the device specified by
|
|
rd.zipl.
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
dracut.cmdline.7.asc | 14 ++++++++++
|
|
modules.d/91zipl/install_zipl_cmdline.sh | 33 +++++++++++++++++++++++
|
|
modules.d/91zipl/module-setup.sh | 45 ++++++++++++++++++++++++++++++++
|
|
modules.d/91zipl/parse-zipl.sh | 41 +++++++++++++++++++++++++++++
|
|
4 files changed, 133 insertions(+)
|
|
create mode 100644 modules.d/91zipl/install_zipl_cmdline.sh
|
|
create mode 100644 modules.d/91zipl/module-setup.sh
|
|
create mode 100644 modules.d/91zipl/parse-zipl.sh
|
|
|
|
Index: dracut-042/dracut.cmdline.7.asc
|
|
===================================================================
|
|
--- dracut-042.orig/dracut.cmdline.7.asc 2015-06-24 18:02:08.125301648 +0200
|
|
+++ dracut-042/dracut.cmdline.7.asc 2015-06-24 18:02:12.621557615 +0200
|
|
@@ -884,6 +884,20 @@ CIO_IGNORE
|
|
rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802
|
|
--
|
|
|
|
+ZIPL
|
|
+~~~~
|
|
+**rd.zipl=**__<path to blockdevice>__::
|
|
+ Update the dracut commandline with the values found in the
|
|
+ _dracut-cmdline.conf_ file on the given device.
|
|
+ The values are merged into the existing commandline values
|
|
+ and the udev events are regenerated.
|
|
++
|
|
+[listing]
|
|
+.Example
|
|
+--
|
|
+rd.zipl=UUID=0fb28157-99e3-4395-adef-da3f7d44835a
|
|
+--
|
|
+
|
|
Plymouth Boot Splash
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
**plymouth.enable=0**::
|
|
Index: dracut-042/modules.d/91zipl/install_zipl_cmdline.sh
|
|
===================================================================
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
+++ dracut-042/modules.d/91zipl/install_zipl_cmdline.sh 2015-06-24 18:02:12.621557615 +0200
|
|
@@ -0,0 +1,33 @@
|
|
+#!/bin/bash
|
|
+
|
|
+DEV=$1
|
|
+MNT=/boot/zipl
|
|
+
|
|
+if [ -z "$DEV" ] ; then
|
|
+ echo "No IPL device given"
|
|
+ > /tmp/install.zipl.cmdline-done
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+[ -d ${MNT} ] || mkdir -p ${MNT}
|
|
+
|
|
+mount -o ro ${DEV} ${MNT}
|
|
+if [ "$?" != "0" ] ; then
|
|
+ echo "Failed to mount ${MNT}"
|
|
+ > /tmp/install.zipl.cmdline-done
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+if [ -f ${MNT}/dracut-cmdline.conf ] ; then
|
|
+ cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf
|
|
+fi
|
|
+
|
|
+umount ${MNT}
|
|
+
|
|
+if [ -f /etc/cmdline.d/99zipl.conf ] ; then
|
|
+ systemctl restart dracut-cmdline.service
|
|
+ systemctl restart systemd-udev-trigger.service
|
|
+fi
|
|
+> /tmp/install.zipl.cmdline-done
|
|
+
|
|
+exit 0
|
|
Index: dracut-042/modules.d/91zipl/module-setup.sh
|
|
===================================================================
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
+++ dracut-042/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:12.621557615 +0200
|
|
@@ -0,0 +1,45 @@
|
|
+#!/bin/bash
|
|
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
+
|
|
+# called by dracut
|
|
+check() {
|
|
+ local _arch=$(uname -m)
|
|
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
|
+ return 0
|
|
+}
|
|
+
|
|
+# called by dracut
|
|
+depends() {
|
|
+ echo grub2
|
|
+ return 0
|
|
+}
|
|
+
|
|
+# called by dracut
|
|
+installkernel() {
|
|
+ instmods ext2
|
|
+}
|
|
+
|
|
+# called by dracut
|
|
+cmdline() {
|
|
+ local _boot_zipl
|
|
+
|
|
+ _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
|
|
+ if [ -n "$_boot_zipl" ] ; then
|
|
+ echo "rd.zipl=${_boot_zipl}"
|
|
+ fi
|
|
+}
|
|
+
|
|
+# called by dracut
|
|
+install() {
|
|
+ inst_multiple mount umount
|
|
+
|
|
+ inst_hook cmdline 91 "$moddir/parse-zipl.sh"
|
|
+ inst "${moddir}/install_zipl_cmdline.sh" /sbin/install_zipl_cmdline.sh
|
|
+ if [[ $hostonly_cmdline == "yes" ]] ; then
|
|
+ local _zipl=$(cmdline)
|
|
+
|
|
+ [[ $_zipl ]] && printf "%s\n" "$_zipl"
|
|
+ fi
|
|
+ dracut_need_initqueue
|
|
+}
|
|
Index: dracut-042/modules.d/91zipl/parse-zipl.sh
|
|
===================================================================
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
+++ dracut-042/modules.d/91zipl/parse-zipl.sh 2015-06-24 18:02:12.621557615 +0200
|
|
@@ -0,0 +1,41 @@
|
|
+#!/bin/sh
|
|
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
+
|
|
+zipl_arg=$(getarg rd.zipl)
|
|
+
|
|
+if [ -n "$zipl_arg" ] ; then
|
|
+ case "$zipl_arg" in
|
|
+ LABEL=*) \
|
|
+ zipl_env="ENV{ID_FS_LABEL}"
|
|
+ zipl_val=${zipl_arg#LABEL=}
|
|
+ zipl_arg="/dev/disk/by-label/${zipl_val}"
|
|
+ ;;
|
|
+ UUID=*) \
|
|
+ zipl_env="ENV{ID_FS_UUID}"
|
|
+ zipl_val=${zipl_arg#UUID=}
|
|
+ zipl_arg="/dev/disk/by-uuid/${zipl_val}"
|
|
+ ;;
|
|
+ /dev/mapper/*) \
|
|
+ zipl_env="ENV{DM_NAME}"
|
|
+ zipl_val=${zipl_arg#/dev/mapper/}
|
|
+ ;;
|
|
+ /dev/disk/by-*) \
|
|
+ zipl_env="SYMLINK"
|
|
+ zipl_val=${zipl_arg#/dev/}
|
|
+ ;;
|
|
+ /dev/*) \
|
|
+ zipl_env="KERNEL"
|
|
+ zipl_val=${zipl_arg}
|
|
+ ;;
|
|
+ esac
|
|
+ if [ "$zipl_env" ] ; then
|
|
+ {
|
|
+ printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/install_zipl_cmdline.sh %s"\n' \
|
|
+ ${zipl_env} ${zipl_val} ${zipl_arg}
|
|
+ echo "[ -f /tmp/install.zipl.cmdline-done ]" >$hookdir/initqueue/finished/wait-zipl-conf.sh
|
|
+ } >> /etc/udev/rules.d/99zipl-conf.rules
|
|
+ cat /etc/udev/rules.d/99zipl-conf.rules
|
|
+ fi
|
|
+ wait_for_dev -n "$zipl_arg"
|
|
+fi
|