]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
40network/check: output which binary is missing for the network module
authorMarc Grimme <grimme@atix.de>
Thu, 23 Jul 2009 10:17:57 +0000 (12:17 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 23 Jul 2009 10:17:57 +0000 (12:17 +0200)
modules.d/40network/check

index 3d4503050e5831ea9b4dcfe0c798d6e0292e84d4..c1b3f901fb15dfbe4a4ec76868fa12d29f2315f4 100755 (executable)
@@ -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