From 79853dc9bca6088aaa8ab0ca8a043b392d9d625b Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 23 Nov 2011 15:03:27 +0000 Subject: [PATCH] netconf: run lspci earlier for netconf -c . Reported by Tenkawa --- commands/netconf/netconf.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/commands/netconf/netconf.sh b/commands/netconf/netconf.sh index ca51df4a5..848be483d 100644 --- a/commands/netconf/netconf.sh +++ b/commands/netconf/netconf.sh @@ -103,6 +103,9 @@ first_pcicard=4 cards() { + # Run lspci once to a temp file for use in 'card' function + lspci >$LSPCI || exit + card 0 "No Ethernet card (no networking)" card 1 "3Com 501 or 3Com 509 based card" card 2 "Realtek 8029 based card (also emulated by Qemu)" "10EC:8029" @@ -116,6 +119,9 @@ cards() done card $first_after_pci "Different Ethernet card (no networking)" + + # Remove temporary lspci output + rm -f $LSPCI } warn() @@ -312,9 +318,6 @@ while getopts ":qe:p:aH:i:n:g:d:s:hc" arg; do esac done -# Run lspci once to a temp file -lspci >$LSPCI || exit - # Verify parameter count if [ "$dhcp" != "yes" ] ; then if [ $manual_opts -gt 0 ] ; then @@ -365,9 +368,6 @@ else fi echo "$driverargs" > $LOCALRC -# Remove temporary lspci output -rm -f $LSPCI - if [ -n "$manual" ] then # Backup config file if it exists and we're not running from CD @@ -395,4 +395,5 @@ fi test "$cd" != "yes" && test "$v" = 1 && echo " You might have to reboot for the changes to take effect." + exit 0 -- 2.44.0