]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat: add addional global variables
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Sun, 17 Jan 2021 22:44:17 +0000 (22:44 +0000)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 18 Jan 2021 14:45:18 +0000 (14:45 +0000)
dracut.conf.d/fedora.conf.example
dracut.sh

index b32abb096f802695cdbd41ba68b4b810d0f1c041..475da95cbc6673676bcb22b2f3945f0ac32a9b7b 100644 (file)
@@ -10,9 +10,22 @@ stdloglvl=3
 sysloglvl=5
 install_optional_items+=" vi /etc/virc ps grep cat rm "
 prefix="/"
+environment=/usr/lib/environment.d
+dbus=/usr/share/dbus-1
+dbusinterfaces=/usr/share/dbus-1/interfaces
+dbusservices=/usr/share/dbus-1/services
+dbussession=/usr/share/dbus-1/session.d
+dbussystem=/usr/share/dbus-1/system.d
+dbussystemservices=/usr/share/dbus-1/system-services
+sysctld=/usr/lib/sysctl.d
 systemdutildir=/usr/lib/systemd
+systemdcatalog=/usr/lib/systemd/catalog
+systemdntpunits=/usr/lib/systemd/ntp-units.d
+systemdportable=/usr/lib/systemd/portable
 systemdsystemunitdir=/usr/lib/systemd/system
 systemdsystemconfdir=/etc/systemd/system
+systemduser=/usr/lib/systemd/user
+sysusers=/usr/lib/sysusers.d
 udevdir=/usr/lib/udev
 hostonly="yes"
 hostonly_cmdline="no"
index e59e76ea46eb90005740422f765724e6b880e4bd..4b35b92e99b5c952baf0b69f30343473d8c63510 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1427,6 +1427,36 @@ for dev in "${!host_fs_types[@]}"; do
     fi
 done
 
+[[ -d $dracutsysrootdir$dbus ]] \
+         || dbus=$(pkg-config dbus --variable=dbus 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$dbus" ]] || dbus=/usr/share/dbus-1
+
+[[ -d $dracutsysrootdir$dbusinterfaces ]] \
+          || dbusinterfaces=$(pkg-config dbus --variable=dbusinterfaces 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$dbusinterfaces" ]] || dbusinterfaces=${dbus}/interfaces
+
+[[ -d $dracutsysrootdir$dbusservices ]] \
+          || dbusservices=$(pkg-config dbus --variable=dbusservices 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$dbusservices" ]] || dbusservices=${dbus}/services
+
+[[ -d $dracutsysrootdir$dbussession ]] \
+          || dbussession=$(pkg-config dbus --variable=dbussession 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$dbussession" ]] || dbussession=${dbus}/session.d
+
+[[ -d $dracutsysrootdir$dbussystem ]] \
+          || dbussystem=$(pkg-config dbus --variable=dbussystem 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$dbussystem" ]] || dbussystem=${dbus}/system.d
+
+[[ -d $dracutsysrootdir$dbussystemservices ]] \
+          || dbussystemservices=$(pkg-config dbus --variable=dbussystemservices 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$dbussystemservices" ]] || dbussystemservices=${dbus}/system-services
+
 [[ -d $dracutsysrootdir$udevdir ]] \
     || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)"
 if ! [[ -d "$dracutsysrootdir$udevdir" ]]; then
@@ -1434,16 +1464,56 @@ if ! [[ -d "$dracutsysrootdir$udevdir" ]]; then
     [[ -e $dracutsysrootdir/usr/lib/udev/ata_id ]] && udevdir=/usr/lib/udev
 fi
 
+[[ -d $dracutsysrootdir$sysctl ]] \
+        || sysctl=$(pkg-config systemd --variable=sysctl 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$sysctl" ]] || sysusers=/usr/lib/sysctl.d
+
+[[ -d $dracutsysrootdir$environment ]] \
+      || environment=$(pkg-config systemd --variable=environment 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$environment" ]] || environment=/usr/lib/environment.d
+
+[[ -d $dracutsysrootdir$systemdcatalog ]] \
+      || systemdcatalog=$(pkg-config systemd --variable=systemdcatalog 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$systemdcatalog" ]] || systemdcatalog=${systemdutildir}/catalog
+
+[[ -d $dracutsysrootdir$systemdnetwork ]] \
+      || systemdnetwork=$(pkg-config systemd --variable=systemdnetwork 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$systemdnetwork" ]] || systemdnetwork=${systemdutildir}/network
+
+[[ -d $dracutsysrootdir$systemdntpunits ]] \
+      || systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$systemdntpunits" ]] || systemdntpunits=${systemdutildir}/ntp-units.d
+
+[[ -d $dracutsysrootdir$systemdportable ]] \
+      || systemdportable=$(pkg-config systemd --variable=systemdportable 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$systemdportable" ]] || systemdportable=${systemdutildir}/portable
+
 [[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
     || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null)
 
 [[ -d "$dracutsysrootdir$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
 
+[[ -d $dracutsysrootdir$systemduser ]] \
+      || systemduser=$(pkg-config systemd --variable=systemduser 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$systemduser" ]] || systemduser=${systemdutildir}/user
+
 [[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
     || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2>/dev/null)
 
 [[ -d "$dracutsysrootdir$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system
 
+[[ -d $dracutsysrootdir$sysusers ]] \
+       || sysusers=$(pkg-config systemd --variable=sysusers 2>/dev/null)
+
+[[ -d "$dracutsysrootdir$sysusers" ]] || sysusers=/usr/lib/sysusers.d
+
 [[ -d $dracutsysrootdir$tmpfilesdir ]] \
     || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null)
 
@@ -1461,7 +1531,10 @@ export initdir dracutbasedir \
     stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
     debug host_fs_types host_devs swap_devs sshkey add_fstab \
     DRACUT_VERSION udevdir prefix filesystems drivers \
-    systemdutildir systemdsystemunitdir systemdsystemconfdir \
+    dbus dbusinterfaces dbusservices dbussession dbussystem \
+    dbussystemservices environment sysctl \
+    systemdutildir systemdcatalog systemdntpunits \
+    systemdsystemunitdir systemdsystemconfdir \
     hostonly_cmdline loginstall \
     tmpfilesdir