From: Marc Grimme Date: Thu, 23 Jul 2009 10:17:57 +0000 (+0200) Subject: 40network/check: output which binary is missing for the network module X-Git-Tag: 0.7~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c993cfb32fe09e2bc3bd84bb1158032ea75f92ce;p=thirdparty%2Fdracut.git 40network/check: output which binary is missing for the network module --- diff --git a/modules.d/40network/check b/modules.d/40network/check index 3d4503050..c1b3f901f 100755 --- a/modules.d/40network/check +++ b/modules.d/40network/check @@ -1,4 +1,19 @@ #!/bin/sh -which ip dhclient hostname brctl >/dev/null 2>&1 || exit 1 + +. ./dracut-functions + +for program in ip hostname; do + which $program >/dev/null 2>&1 + if [ $? -ne 0 ]; then + dwarning "Could not find program \"$program\" required by network." + exit 1 + fi +done +for program in dhclient brctl; do + which $program >/dev/null 2>&1 + if [ $? -ne 0 ]; then + dwarning "Could not find program \"$program\" it might be required by network." + fi +done exit 255