]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(network): use wicked unit instead of find_binary
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Tue, 27 Apr 2021 09:55:12 +0000 (09:55 +0000)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 28 Apr 2021 11:21:57 +0000 (13:21 +0200)
dracut-install triggers "ERROR: installing '/usr/lib/wicked/bin/*'"
when find_binary is being used to determine if wicked is installed
so let's just check for the wicked type service unit instead.

modules.d/40network/module-setup.sh

index 4c63e8284c8288a2b7ddc45131b23c1ffd274e3b..648d84d6364ab32d075625258646a5a56f8fc5f6 100755 (executable)
@@ -17,7 +17,7 @@ depends() {
     done
 
     if [ -z "$network_handler" ]; then
-        if find_binary wicked &> /dev/null; then
+        if [[ -x $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
             network_handler="network-wicked"
         elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then
             network_handler="network-manager"