Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
dracut.608
0176-Parse-rootflags-correctly.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0176-Parse-rootflags-correctly.patch of Package dracut.608
Index: dracut-037/modules.d/98systemd/module-setup.sh =================================================================== --- dracut-037.orig/modules.d/98systemd/module-setup.sh 2015-05-11 18:17:47.824360623 +0200 +++ dracut-037/modules.d/98systemd/module-setup.sh 2015-05-11 18:17:49.952480263 +0200 @@ -43,7 +43,6 @@ $systemdutildir/systemd-sysctl \ $systemdutildir/systemd-modules-load \ $systemdutildir/systemd-vconsole-setup \ - $systemdutildir/system-generators/systemd-fstab-generator \ $systemdutildir/system-generators/systemd-gpt-auto-generator \ \ $systemdsystemunitdir/cryptsetup.target \ @@ -193,6 +192,7 @@ inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator + inst_simple "$systemdutildir/system-generators/systemd-fstab-generator" $systemdutildir/system-generator-moved/systemd-fstab-generator inst_binary true ln_r $(type -P true) "/usr/bin/loginctl" Index: dracut-037/modules.d/98systemd/rootfs-generator.sh =================================================================== --- dracut-037.orig/modules.d/98systemd/rootfs-generator.sh 2015-05-11 18:17:47.824360623 +0200 +++ dracut-037/modules.d/98systemd/rootfs-generator.sh 2015-05-11 18:18:21.010226747 +0200 @@ -44,22 +44,30 @@ local _name [ -z "$1" ] && return 0 + [ -f /run/systemd/generator/sysroot.mount ] && return 0 _name=$(dev_unit_name "$1") [ -d /run/systemd/generator ] || mkdir -p /run/systemd/generator - if ! [ -f /run/systemd/generator/sysroot.mount ]; then - { - echo "[Unit]" - echo "Before=initrd-root-fs.target" - echo "RequiresOverridable=systemd-fsck@${_name}.service" - echo "After=systemd-fsck@${_name}.service" - echo "[Mount]" - echo "Where=/sysroot" - echo "What=$1" - echo "Options=${_flags}" - echo "Type=${_type}" - } > /run/systemd/generator/sysroot.mount - fi + + + #make sure that the initial mount is ro + for i in $(echo $_flags | sed 's/,/ /g'); do + [[ $i == rw ]] || [[ $i == ro ]] || rootflags="$rootflags,$i" + done + _flags="${rootflags#,},ro" + + { + echo "[Unit]" + echo "Before=initrd-root-fs.target" + echo "RequiresOverridable=systemd-fsck@${_name}.service" + echo "After=systemd-fsck@${_name}.service" + echo "[Mount]" + echo "Where=/sysroot" + echo "What=$1" + echo "Options=${_flags}" + echo "Type=${_type}" + } > /run/systemd/generator/sysroot.mount + if ! [ -L /run/systemd/generator/initrd-root-fs.target.requires/sysroot.mount ]; then [ -d /run/systemd/generator/initrd-root-fs.target.requires ] || mkdir -p /run/systemd/generator/initrd-root-fs.target.requires ln -s ../sysroot.mount /run/systemd/generator/initrd-root-fs.target.requires/sysroot.mount @@ -113,7 +121,11 @@ generator_wait_for_dev "${root#block:}" "$RDRETRY" generator_fsck_after_pre_mount "${root#block:}" cmdline=$(</proc/cmdline) - test "$cmdline" = "${cmdline#*root=}" && generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" + generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" + fi +#now activate systemd-fstab-generator for additional mounts +cp /usr/lib/systemd/system-generator-moved/systemd-fstab-generator /usr/lib/systemd/system-generators + exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor