]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix: check if dracut-lib.sh is needed before executing
authorJo Zzsi <jozzsicsataban@gmail.com>
Sun, 10 Nov 2024 11:44:39 +0000 (06:44 -0500)
committerLaszlo <laszlo.gombos@gmail.com>
Sun, 10 Nov 2024 12:29:15 +0000 (07:29 -0500)
modules.d/35network-legacy/dhcp-multi.sh
modules.d/90crypt/crypt-run-generator.sh
modules.d/90crypt/cryptroot-ask.sh
modules.d/90kernel-modules/insmodpost.sh
modules.d/99base/init.sh
modules.d/99shutdown/shutdown.sh

index 60e03741c6d5f753758b58a3e3095c14ed250817..f293b2738144181fccf1741d62c074d26fa96e87 100755 (executable)
@@ -6,7 +6,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 # File to start dhclient requests on different interfaces in parallel
 
-. /lib/dracut-lib.sh
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
 . /lib/net-lib.sh
 
 netif=$1
index 3e78e6dedee270fb13c6bd8c5462e96ad64dc371..fd36d7804634c2ae9a7dd20e777c7f789d78beac 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-. /lib/dracut-lib.sh
+type getargs > /dev/null 2>&1 || . /lib/dracut-lib.sh
 type crypttab_contains > /dev/null 2>&1 || . /lib/dracut-crypt-lib.sh
 
 dev=$1
index f9d77ea6b61144d82490562a3910158df82db928..38afd1eca6d1687f12d3168d3f732e3e6382a7fd 100755 (executable)
@@ -6,7 +6,7 @@ NEWROOT=${NEWROOT:-"/sysroot"}
 # do not ask, if we already have root
 [ -f "$NEWROOT"/proc ] && exit 0
 
-. /lib/dracut-lib.sh
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
 
 mkdir -p -m 0700 /run/cryptsetup
 
index 30e49645e7820459246195cd262486f2ec56b3af..9420c848e65db5f821a850acc246b5a1d17d8846 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-. /lib/dracut-lib.sh
+type getargs > /dev/null 2>&1 || . /lib/dracut-lib.sh
 
 for modlist in $(getargs rd.driver.post); do
     (
index 74d16237ac3b679b9153f3a8437ed49237bd5782..cc50653e9e62ea0f3a7936fadd57545083785a8c 100755 (executable)
@@ -33,7 +33,7 @@ if [ ! -d /sys/kernel ]; then
 fi
 
 RD_DEBUG=""
-. /lib/dracut-lib.sh
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
 
 setdebug
 
index d48d7d1fb30451466b7b1b2e03248c6f4b49935a..bce725648d8ec1454e933799d7fa9c946811b039 100755 (executable)
@@ -17,7 +17,7 @@ ACTION="$1"
 
 export TERM=linux
 export PATH=/usr/sbin:/usr/bin:/sbin:/bin
-. /lib/dracut-lib.sh
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
 
 if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then
     mount -o remount,rw /