]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Setup SegFault-Fix.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 20 Aug 2007 09:01:12 +0000 (09:01 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 20 Aug 2007 09:01:12 +0000 (09:01 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@788 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

src/install+setup/install/probehw.sh
src/install+setup/setup/networking.c

index ff4320aff1858f7b356bce1e58bf993b390d0b55..6ca3e37db4f167ceb78dff883d9fdbe563a60667 100644 (file)
@@ -2,17 +2,20 @@
 
 echo "Detecting Hardware..."
 for MODULE in $(kudzu -qps  -t 30 | grep driver: | cut -d ' ' -f 2 | sort | uniq); do
-    if [ "${MODULE}" = "unknown" ] || \
-        [ "${MODULE}" = "ignore" ]; then
+               if [ "${MODULE}" = "unknown" ] || \
+                               [ "${MODULE}" = "ignore" ] || \
+                               [ "${MODULE}" = "" ]; then
         continue
-    fi
-    MODULE=$(basename $(find /lib/modules -name $(echo $MODULE | sed -e 's/[_-]/*/g')* ) | cut -d. -f1 | head -1)
+               fi
+               echo -n "Module: $MODULE --> "
+               MODULE=$(basename $(find /lib/modules -name $(echo $MODULE | sed -e 's/[_-]/*/g')* ) | cut -d. -f1 | head -1)
+               echo "$MODULE"
     
-    if grep -Eqe "^${MODULE} " /proc/modules; then
-        continue
-    fi
-    echo -n "Loading ${MODULE}"
-    modprobe ${MODULE} >/dev/null 2>&1
+               if grep -Eqe "^${MODULE} " /proc/modules; then
+                       continue
+               fi
+               echo -n "Loading ${MODULE}"
+               modprobe ${MODULE} >/dev/null 2>&1
                echo " --> ecode: $?"
 done
 
index 740f352f4a7e82fe34987edffb3b36388cde5fd4..351902a14e907973a0d2f34bcdf4453aea2045f5 100644 (file)
@@ -245,10 +245,12 @@ int firstmenu(void)
        if (netaddresschange) 
                strcpy(networkrestart, ctr[TR_RESTART_REQUIRED]);
 
-       strcpy(temp, ""); findkey(kv, "CONFIG_TYPE", temp); x = atol(temp);
-       if (x < 1 || x > 4) x = 0;
+       strcpy(temp, ""); findkey(kv, "CONFIG_TYPE", temp); 
+       x = atol(temp);
+       x--;
+       if (x < 1 || x > 4) x = 1;
        /* Format heading bit. */
-       snprintf(message, 1000, ctr[TR_CURRENT_CONFIG], configtypenames[x-1],
+       snprintf(message, 1000, ctr[TR_CURRENT_CONFIG], configtypenames[x],
                networkrestart);
        rc = newtWinMenu(ctr[TR_NETWORK_CONFIGURATION_MENU], message, 50, 5, 5, 6,
                        sections, &choice, ctr[TR_OK], ctr[TR_DONE], NULL);