]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): correct wrong systemd variable paths
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 11 Jul 2022 10:52:58 +0000 (12:52 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 29 Sep 2022 05:37:07 +0000 (05:37 +0000)
systemdsystemconfdir usually expands to /etc/systemd/system, but the local
configuration of systemd-networkd, systemd-timesyncd, portablectl and systemd
users is saved into directories whose parent is /etc/systemd
(systemdutilconfdir).

Also add missing exports.

dracut.sh

index 0ed86e1e2f7509d9ff09892066655a6320ac28f4..d3e1df3955be6ba49ac549eb9a22137243fce6d2 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1833,7 +1833,7 @@ fi
 [[ -d $dracutsysrootdir$systemdnetworkconfdir ]] \
     || systemdnetworkconfdir=$(pkg-config systemd --variable=systemdnetworkconfdir 2> /dev/null)
 
-[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdsystemconfdir}/network
+[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdutilconfdir}/network
 
 [[ -d $dracutsysrootdir$systemdntpunits ]] \
     || systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2> /dev/null)
@@ -1843,7 +1843,7 @@ fi
 [[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] \
     || systemdntpunitsconfdir=$(pkg-config systemd --variable=systemdntpunitsconfdir 2> /dev/null)
 
-[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdsystemconfdir}/ntp-units.d
+[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdutilconfdir}/ntp-units.d
 
 [[ -d $dracutsysrootdir$systemdportable ]] \
     || systemdportable=$(pkg-config systemd --variable=systemdportable 2> /dev/null)
@@ -1853,7 +1853,7 @@ fi
 [[ -d $dracutsysrootdir$systemdportableconfdir ]] \
     || systemdportableconfdir=$(pkg-config systemd --variable=systemdportableconfdir 2> /dev/null)
 
-[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdsystemconfdir}/portable
+[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdutilconfdir}/portable
 
 [[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
     || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2> /dev/null)
@@ -1868,7 +1868,7 @@ fi
 [[ -d $dracutsysrootdir$systemduserconfdir ]] \
     || systemduserconfdir=$(pkg-config systemd --variable=systemduserconfdir 2> /dev/null)
 
-[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdsystemconfdir}/user
+[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdutilconfdir}/user
 
 [[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
     || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2> /dev/null)
@@ -1922,8 +1922,10 @@ export initdir dracutbasedir \
     dbussessionconfdir dbussystem dbussystemconfdir dbussystemservices \
     dbussystemservicesconfdir environment environmentconfdir modulesload \
     modulesloadconfdir sysctld sysctlconfdir sysusers sysusersconfdir \
-    systemdutildir systemdutilconfdir systemdcatalog systemdntpunits \
-    systemdntpunitsconfdir systemdsystemunitdir systemdsystemconfdir \
+    systemdutildir systemdutilconfdir systemdcatalog systemdnetwork \
+    systemdnetworkconfdir systemdntpunits systemdntpunitsconfdir \
+    systemdportable systemdportableconfdir systemdsystemunitdir \
+    systemdsystemconfdir systemduser systemduserconfdir \
     hostonly_cmdline loginstall tmpfilesdir tmpfilesconfdir depmodd \
     depmodconfdir