Projects
Eulaceura:Mainline:GA
dracut
_service:obs_scm:revert-fix-systemd-networkd-ma...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:revert-fix-systemd-networkd-make-systemd-networkd.patch of Package dracut
From 594e8e187ab98f913c1abe60b7dd9c03c1bd3e9e Mon Sep 17 00:00:00 2001 From: openEuler Buildteam <buildteam@openeuler.org> Date: Tue, 17 Jan 2023 17:22:09 +0800 Subject: [PATCH] revert "fix(systemd-networkd): make systemd-networkd a proper network provider" This reverts commit ea779750c371102c04252b48f1b7d9c7ece7cf93 to make network-legacy to be the network provider. --- modules.d/01systemd-networkd/module-setup.sh | 93 ++++++++------------ modules.d/40network/module-setup.sh | 4 +- 2 files changed, 39 insertions(+), 58 deletions(-) diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh index 27d9010..c0a970f 100755 --- a/modules.d/01systemd-networkd/module-setup.sh +++ b/modules.d/01systemd-networkd/module-setup.sh @@ -1,81 +1,64 @@ #!/bin/bash -# This file is part of dracut. -# SPDX-License-Identifier: GPL-2.0-or-later -# Prerequisite check(s) for module. +# called by dracut check() { [[ $mount_needs ]] && return 1 - # If the binary(s) requirements are not fulfilled the module can't be installed - require_binaries ip networkctl \ - "$systemdutildir"/systemd-networkd \ - "$systemdutildir"/systemd-network-generator \ - "$systemdutildir"/systemd-networkd-wait-online \ - || return 1 - - # Return 255 to only include the module, if another module requires it. return 255 - } -# Module dependency requirements. +# called by dracut depends() { + echo "systemd kernel-network-modules" +} - # This module has external dependency on other module(s). - echo dbus kernel-network-modules systemd-sysusers - # Return 0 to include the dependent module(s) in the initramfs. +installkernel() { return 0 - } -# Install the required file(s) and directories for the module in the initramfs. +# called by dracut install() { - inst_multiple -o \ - "$dbussystem"/org.freedesktop.network1.conf \ - "$dbussystemservices"/org.freedesktop.network1.service \ - "$systemdutildir"/networkd.conf \ - "$systemdutildir/networkd.conf.d/*.conf" \ "$systemdutildir"/systemd-networkd \ - "$systemdutildir"/systemd-network-generator \ "$systemdutildir"/systemd-networkd-wait-online \ - "$systemdnetwork"/80-container-host0.network \ - "$systemdnetwork"/80-container-ve.network \ - "$systemdnetwork"/80-container-vz.network \ - "$systemdnetwork"/80-vm-vt.network \ - "$systemdnetwork"/80-wifi-adhoc.network \ - "$systemdnetwork"/99-default.link \ + "$systemdsystemunitdir"/systemd-networkd-wait-online.service \ "$systemdsystemunitdir"/systemd-networkd.service \ "$systemdsystemunitdir"/systemd-networkd.socket \ - "$systemdsystemunitdir"/systemd-network-generator.service \ - "$systemdsystemunitdir"/systemd-networkd-wait-online.service \ - "$systemdsystemunitdir"/systemd-network-generator.service \ - "$sysusers"/systemd-network.conf \ + "$systemdutildir"/network/99-default.link \ networkctl ip - # Enable systemd type units + #hostnamectl timedatectl + # $systemdutildir/systemd-timesyncd \ + # $systemdutildir/systemd-timedated \ + # $systemdutildir/systemd-hostnamed \ + # $systemdutildir/systemd-resolvd \ + # $systemdutildir/systemd-resolve-host \ + # $systemdsystemunitdir/systemd-resolved.service \ + # $systemdsystemunitdir/systemd-hostnamed.service \ + # $systemdsystemunitdir/systemd-timesyncd.service \ + # $systemdsystemunitdir/systemd-timedated.service \ + # $systemdsystemunitdir/time-sync.target \ + # /etc/systemd/resolved.conf \ + + # inst_dir /var/lib/systemd/clock + + grep '^systemd-network:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd" + grep '^systemd-network:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group" + # grep '^systemd-timesync:' "$dracutsysrootdir"/etc/passwd 2>/dev/null >> "$initdir/etc/passwd" + # grep '^systemd-timesync:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group" + + _arch=${DRACUT_ARCH:-$(uname -m)} + inst_libdir_file \ + {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ + {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" \ + {"tls/$_arch/",tls/,"$_arch/",}"libnss_myhostname.so.*" \ + {"tls/$_arch/",tls/,"$_arch/",}"libnss_resolve.so.*" + + # systemd-timesyncd.service for i in \ + systemd-networkd-wait-online.service \ systemd-networkd.service \ - systemd-networkd.socket \ - systemd-network-generator.service \ - systemd-networkd-wait-online.service; do + systemd-networkd.socket; do $SYSTEMCTL -q --root "$initdir" enable "$i" done - - # Install the hosts local user configurations if enabled. - if [[ $hostonly ]]; then - inst_multiple -H -o \ - "$systemdutilconfdir"/networkd.conf \ - "$systemdutilconfdir/networkd.conf.d/*.conf" \ - "$systemdnetworkconfdir/*" \ - "$systemdsystemconfdir"/systemd-networkd.service \ - "$systemdsystemconfdir/systemd-networkd.service/*.conf" \ - "$systemdsystemconfdir"/systemd-networkd.socket \ - "$systemdsystemconfdir/systemd-networkd.socket/*.conf" \ - "$systemdsystemconfdir"/systemd-network-generator.service \ - "$systemdsystemconfdir/systemd-network-generator.service/*.conf" \ - "$systemdsystemconfdir"/systemd-networkd-wait-online.service \ - "$systemdsystemconfdir/systemd-networkd-wait-online.service/*.conf" \ - "$sysusersconfdir"/systemd-network.conf - fi } diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index 1ab13ef..49b45f3 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh @@ -9,7 +9,7 @@ check() { depends() { is_qemu_virtualized && echo -n "qemu-net " - for module in network-wicked connman network-manager network-legacy systemd-networkd; do + for module in network-wicked connman network-manager network-legacy; do if dracut_module_included "$module"; then network_handler="$module" break @@ -23,8 +23,6 @@ depends() { network_handler="connman" elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then network_handler="network-manager" - elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then - network_handler="systemd-networkd" else network_handler="network-legacy" fi -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2