Ich hab mal ein bisschen die Arbeit vom Cuebernommen :D
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 2 Jan 2007 18:40:12 +0000 (18:40 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 2 Jan 2007 18:40:12 +0000 (18:40 +0000)
Aber trotzdem geht die Routine noch kein bisschen. SegFault :(
Ansonsten: Busyboy erweitert, PCMCIA Support begonnen zu entfernen

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@375 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/common/mc
config/uClibc/busybox.config
doc/packages-list.txt
lfs/mc
src/initscripts/init.d/network
src/install+setup/install/main.c
src/install+setup/install/nic.c
src/install+setup/install/probenic.sh
src/install+setup/libsmooth/libsmooth.h
src/install+setup/libsmooth/main.c
src/install+setup/libsmooth/netstuff.c

index 0888fd0ef7710286d2f24fc2cdd3859c6897a5f6..d151351249e3c995717ee81d8e1817bd1486e67c 100644 (file)
@@ -17,7 +17,7 @@ usr/share/mc/cedit.menu
 usr/share/mc/edit.indent.rc
 usr/share/mc/edit.spell.rc
 #usr/share/mc/extfs
 usr/share/mc/edit.indent.rc
 usr/share/mc/edit.spell.rc
 #usr/share/mc/extfs
-usr/share/mc/extfs/README
+#usr/share/mc/extfs/README
 usr/share/mc/extfs/a
 usr/share/mc/extfs/apt
 usr/share/mc/extfs/audio
 usr/share/mc/extfs/a
 usr/share/mc/extfs/apt
 usr/share/mc/extfs/audio
@@ -28,6 +28,7 @@ usr/share/mc/extfs/debd
 usr/share/mc/extfs/dpkg
 usr/share/mc/extfs/extfs.ini
 usr/share/mc/extfs/hp48
 usr/share/mc/extfs/dpkg
 usr/share/mc/extfs/extfs.ini
 usr/share/mc/extfs/hp48
+usr/share/mc/extfs/iso9660
 usr/share/mc/extfs/lslR
 usr/share/mc/extfs/mailfs
 usr/share/mc/extfs/patchfs
 usr/share/mc/extfs/lslR
 usr/share/mc/extfs/mailfs
 usr/share/mc/extfs/patchfs
@@ -51,27 +52,33 @@ usr/share/mc/mc.hint
 #usr/share/mc/mc.hint.nl
 #usr/share/mc/mc.hint.pl
 #usr/share/mc/mc.hint.ru
 #usr/share/mc/mc.hint.nl
 #usr/share/mc/mc.hint.pl
 #usr/share/mc/mc.hint.ru
+#usr/share/mc/mc.hint.sr
 #usr/share/mc/mc.hint.uk
 #usr/share/mc/mc.hint.zh
 #usr/share/mc/mc.hint.uk
 #usr/share/mc/mc.hint.zh
-#usr/share/mc/mc.hint.sr
-#usr/share/mc/mc.menu.sr
 usr/share/mc/mc.hlp
 usr/share/mc/mc.lib
 usr/share/mc/mc.menu
 usr/share/mc/mc.hlp
 usr/share/mc/mc.lib
 usr/share/mc/mc.menu
+#usr/share/mc/mc.menu.sr
 #usr/share/mc/syntax
 usr/share/mc/syntax/Syntax
 usr/share/mc/syntax/ada95.syntax
 #usr/share/mc/syntax
 usr/share/mc/syntax/Syntax
 usr/share/mc/syntax/ada95.syntax
+usr/share/mc/syntax/aspx.syntax
+usr/share/mc/syntax/assembler.syntax
 usr/share/mc/syntax/c.syntax
 usr/share/mc/syntax/changelog.syntax
 usr/share/mc/syntax/c.syntax
 usr/share/mc/syntax/changelog.syntax
+usr/share/mc/syntax/cs.syntax
 usr/share/mc/syntax/diff.syntax
 usr/share/mc/syntax/dos.syntax
 usr/share/mc/syntax/diff.syntax
 usr/share/mc/syntax/dos.syntax
+usr/share/mc/syntax/eiffel.syntax
 usr/share/mc/syntax/fortran.syntax
 usr/share/mc/syntax/html.syntax
 usr/share/mc/syntax/fortran.syntax
 usr/share/mc/syntax/html.syntax
+usr/share/mc/syntax/idl.syntax
 usr/share/mc/syntax/java.syntax
 usr/share/mc/syntax/js.syntax
 usr/share/mc/syntax/latex.syntax
 usr/share/mc/syntax/lisp.syntax
 usr/share/mc/syntax/lsm.syntax
 usr/share/mc/syntax/java.syntax
 usr/share/mc/syntax/js.syntax
 usr/share/mc/syntax/latex.syntax
 usr/share/mc/syntax/lisp.syntax
 usr/share/mc/syntax/lsm.syntax
+usr/share/mc/syntax/lua.syntax
 usr/share/mc/syntax/m4.syntax
 usr/share/mc/syntax/mail.syntax
 usr/share/mc/syntax/makefile.syntax
 usr/share/mc/syntax/m4.syntax
 usr/share/mc/syntax/mail.syntax
 usr/share/mc/syntax/makefile.syntax
@@ -82,7 +89,9 @@ usr/share/mc/syntax/pascal.syntax
 usr/share/mc/syntax/perl.syntax
 usr/share/mc/syntax/php.syntax
 usr/share/mc/syntax/po.syntax
 usr/share/mc/syntax/perl.syntax
 usr/share/mc/syntax/php.syntax
 usr/share/mc/syntax/po.syntax
+usr/share/mc/syntax/povray.syntax
 usr/share/mc/syntax/python.syntax
 usr/share/mc/syntax/python.syntax
+usr/share/mc/syntax/ruby.syntax
 usr/share/mc/syntax/sh.syntax
 usr/share/mc/syntax/slang.syntax
 usr/share/mc/syntax/smalltalk.syntax
 usr/share/mc/syntax/sh.syntax
 usr/share/mc/syntax/slang.syntax
 usr/share/mc/syntax/smalltalk.syntax
@@ -94,20 +103,3 @@ usr/share/mc/syntax/tcl.syntax
 usr/share/mc/syntax/texinfo.syntax
 usr/share/mc/syntax/unknown.syntax
 usr/share/mc/syntax/xml.syntax
 usr/share/mc/syntax/texinfo.syntax
 usr/share/mc/syntax/unknown.syntax
 usr/share/mc/syntax/xml.syntax
-#usr/share/mc/term
-#usr/share/mc/term/README.xterm
-usr/share/mc/term/ansi.ti
-usr/share/mc/term/linux.ti
-usr/share/mc/term/vt100.ti
-usr/share/mc/term/xterm.ad
-usr/share/mc/term/xterm.tcap
-usr/share/mc/term/xterm.ti
-usr/share/mc/extfs/iso9660
-usr/share/mc/syntax/aspx.syntax
-usr/share/mc/syntax/assembler.syntax
-usr/share/mc/syntax/cs.syntax
-usr/share/mc/syntax/eiffel.syntax
-usr/share/mc/syntax/idl.syntax
-usr/share/mc/syntax/lua.syntax
-usr/share/mc/syntax/povray.syntax
-usr/share/mc/syntax/ruby.syntax
index 4d09475494c6e4fd052dbfcf65fd07b563632af0..ddad3075a6a296411c4b4b4971e594800846652d 100644 (file)
@@ -236,17 +236,17 @@ CONFIG_FEATURE_HUMAN_READABLE=y
 #
 # Console Utilities
 #
 #
 # Console Utilities
 #
-# CONFIG_CHVT is not set
-# CONFIG_CLEAR is not set
+CONFIG_CHVT=y
+CONFIG_CLEAR=y
 # CONFIG_DEALLOCVT is not set
 # CONFIG_DUMPKMAP is not set
 # CONFIG_DEALLOCVT is not set
 # CONFIG_DUMPKMAP is not set
-# CONFIG_LOADFONT is not set
-# CONFIG_LOADKMAP is not set
+CONFIG_LOADFONT=y
+CONFIG_LOADKMAP=y
 # CONFIG_OPENVT is not set
 # CONFIG_RESET is not set
 # CONFIG_OPENVT is not set
 # CONFIG_RESET is not set
-# CONFIG_SETCONSOLE is not set
+CONFIG_SETCONSOLE=y
 # CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
 # CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
-# CONFIG_SETKEYCODES is not set
+CONFIG_SETKEYCODES=y
 # CONFIG_SETLOGCONS is not set
 
 #
 # CONFIG_SETLOGCONS is not set
 
 #
@@ -266,7 +266,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y
 #
 # Editors
 #
 #
 # Editors
 #
-# CONFIG_AWK is not set
+CONFIG_AWK=y
 # CONFIG_FEATURE_AWK_MATH is not set
 # CONFIG_ED is not set
 # CONFIG_PATCH is not set
 # CONFIG_FEATURE_AWK_MATH is not set
 # CONFIG_ED is not set
 # CONFIG_PATCH is not set
@@ -502,7 +502,7 @@ CONFIG_FEATURE_IFCONFIG_STATUS=y
 # CONFIG_FEATURE_IFCONFIG_SLIP is not set
 # CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
 # CONFIG_FEATURE_IFCONFIG_HW is not set
 # CONFIG_FEATURE_IFCONFIG_SLIP is not set
 # CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
 # CONFIG_FEATURE_IFCONFIG_HW is not set
-# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
 # CONFIG_IFUPDOWN is not set
 # CONFIG_FEATURE_IFUPDOWN_IP is not set
 # CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
 # CONFIG_IFUPDOWN is not set
 # CONFIG_FEATURE_IFUPDOWN_IP is not set
 # CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
@@ -517,10 +517,10 @@ CONFIG_FEATURE_IFCONFIG_STATUS=y
 # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
 # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
 # CONFIG_FEATURE_INETD_RPC is not set
 # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
 # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
 # CONFIG_FEATURE_INETD_RPC is not set
-# CONFIG_IP is not set
-# CONFIG_FEATURE_IP_ADDRESS is not set
-# CONFIG_FEATURE_IP_LINK is not set
-# CONFIG_FEATURE_IP_ROUTE is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
 # CONFIG_FEATURE_IP_TUNNEL is not set
 # CONFIG_FEATURE_IP_SHORT_FORMS is not set
 # CONFIG_IPADDR is not set
 # CONFIG_FEATURE_IP_TUNNEL is not set
 # CONFIG_FEATURE_IP_SHORT_FORMS is not set
 # CONFIG_IPADDR is not set
@@ -545,7 +545,7 @@ CONFIG_ROUTE=y
 # CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
 # CONFIG_TELNETD is not set
 # CONFIG_FEATURE_TELNETD_INETD is not set
 # CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
 # CONFIG_TELNETD is not set
 # CONFIG_FEATURE_TELNETD_INETD is not set
-CONFIG_TFTP=y
+# CONFIG_TFTP is not set
 # CONFIG_FEATURE_TFTP_GET is not set
 # CONFIG_FEATURE_TFTP_PUT is not set
 # CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
 # CONFIG_FEATURE_TFTP_GET is not set
 # CONFIG_FEATURE_TFTP_PUT is not set
 # CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
@@ -608,14 +608,14 @@ CONFIG_ASH_JOB_CONTROL=y
 CONFIG_ASH_ALIAS=y
 CONFIG_ASH_MATH_SUPPORT=y
 # CONFIG_ASH_MATH_SUPPORT_64 is not set
 CONFIG_ASH_ALIAS=y
 CONFIG_ASH_MATH_SUPPORT=y
 # CONFIG_ASH_MATH_SUPPORT_64 is not set
-# CONFIG_ASH_GETOPTS is not set
-# CONFIG_ASH_BUILTIN_ECHO is not set
-# CONFIG_ASH_BUILTIN_TEST is not set
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_BUILTIN_ECHO=y
+CONFIG_ASH_BUILTIN_TEST=y
 # CONFIG_ASH_CMDCMD is not set
 # CONFIG_ASH_MAIL is not set
 CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
 # CONFIG_ASH_RANDOM_SUPPORT is not set
 # CONFIG_ASH_CMDCMD is not set
 # CONFIG_ASH_MAIL is not set
 CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
 # CONFIG_ASH_RANDOM_SUPPORT is not set
-# CONFIG_ASH_EXPAND_PRMT is not set
+CONFIG_ASH_EXPAND_PRMT=y
 # CONFIG_HUSH is not set
 # CONFIG_LASH is not set
 # CONFIG_MSH is not set
 # CONFIG_HUSH is not set
 # CONFIG_LASH is not set
 # CONFIG_MSH is not set
index 044a21b93802b98a5d7964472109a94a01c9a26b..303a2096015ed1d0ae25216a7071b953b56a25de 100644 (file)
@@ -46,7 +46,6 @@
 * ccache-2.4
 * cdrtools-2.01
 * cftp-0.12
 * ccache-2.4
 * cdrtools-2.01
 * cftp-0.12
-* clamav-0.88.6
 * clamav-0.88.7
 * coreutils-5.96
 * cups-1.2.2
 * clamav-0.88.7
 * coreutils-5.96
 * cups-1.2.2
@@ -84,7 +83,6 @@
 * glib-2.9.6
 * glibc-2.3.6
 * gmp-4.2
 * glib-2.9.6
 * glibc-2.3.6
 * gmp-4.2
-* gnump3d-2.9.8
 * gnump3d-2.9.9.9
 * gnupg-1.4.5
 * grep-2.5.1a
 * gnump3d-2.9.9.9
 * gnupg-1.4.5
 * grep-2.5.1a
 * make-3.80
 * man-db-2.4.3
 * man-pages-2.34
 * make-3.80
 * man-db-2.4.3
 * man-pages-2.34
-* mc-4.6.0
 * mc-4.6.1
 * memtest86+-1.65
 * mingetty_1.07
 * mc-4.6.1
 * memtest86+-1.65
 * mingetty_1.07
 * rp-pppoe-3.8
 * rrdtool-1.2.15
 * rsync-2.6.8
 * rp-pppoe-3.8
 * rrdtool-1.2.15
 * rsync-2.6.8
-* samba-3.0.23b
+* samba-3.0.23d
 * screen-4.0.2
 * sed-4.1.5
 * setserial-2.17
 * screen-4.0.2
 * sed-4.1.5
 * setserial-2.17
 * xmbmon205
 * xvidcore-1.1.0
 * yasuc-0.4.1
 * xmbmon205
 * xvidcore-1.1.0
 * yasuc-0.4.1
-* zaptel-1.2.10
 * zaptel-1.4.0
 * zlib-1.2.3
 * zaptel-1.4.0
 * zlib-1.2.3
diff --git a/lfs/mc b/lfs/mc
index 4d511a23c3bfd1d6b261ffa615d040dbd8c0d9cb..1d36f91202a48aeca3329c35c3ab28caad2e24ce 100644 (file)
--- a/lfs/mc
+++ b/lfs/mc
@@ -72,8 +72,9 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && ./configure --prefix=/usr --without-x --disable-nls \
-                               --with-screen=mcslang --with-samba
+       cd $(DIR_APP) && ./configure --prefix=/usr \
+                               --without-x --disable-nls \
+                               --with-samba
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
index 85ac8e90622ff166236bdc492f11ba4a08e29eb2..73ccfc224dfcc68dca55324ae271a72ea340fd4e 100644 (file)
@@ -47,13 +47,6 @@ case "${1}" in
                # Remove possible leftover files
                rm -f CONFIG_ROOT/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
 
                # Remove possible leftover files
                rm -f CONFIG_ROOT/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
 
-               # This won't actually do anything unless a PCMCIA controller was
-               # detected at install time, because /etc/pcmcia.conf won't exist.
-               /etc/rc.d/rc.pcmcia start
-               # Now, just in case we found a PCMCIA USB controller, we'll need to reload
-               # the USB here.
-               /usr/local/bin/resetusb
-
                # The 'for' loop force driver loading order
                for NIC in 0 1 2 3; do
                    ETHX="eth${NIC}"
                # The 'for' loop force driver loading order
                for NIC in 0 1 2 3; do
                    ETHX="eth${NIC}"
@@ -83,12 +76,6 @@ case "${1}" in
                    fi
                done
 
                    fi
                done
 
-               if [ -d /proc/bus/pccard ]; then
-                       boot_mesg "Initializing PCMCIA cardbus modems"
-                       modprobe serial_cb
-                       evaluate_retval
-               fi
-
                boot_mesg "Setting up IPFire firewall rules"
                /etc/rc.d/init.d/firewall start; evaluate_retval
 
                boot_mesg "Setting up IPFire firewall rules"
                /etc/rc.d/init.d/firewall start; evaluate_retval
 
index 8b808031f66bbf1043584a11eaf490aa5edd42ef..3ca80da7aaa7bc78dcea76bb42a97c5ead89da85 100644 (file)
@@ -14,7 +14,7 @@
 #define CDROM_INSTALL 0
 #define URL_INSTALL 1
 #define DISK_INSTALL 2
 #define CDROM_INSTALL 0
 #define URL_INSTALL 1
 #define DISK_INSTALL 2
-#define INST_FILECOUNT 5600
+#define INST_FILECOUNT 6600
 #define UNATTENDED_CONF "/cdrom/boot/unattended.conf"
 
 int raid_disk = 0;
 #define UNATTENDED_CONF "/cdrom/boot/unattended.conf"
 
 int raid_disk = 0;
@@ -288,23 +288,6 @@ int main(int argc, char *argv[])
                        fprintf(flog, "Manual FDISK selected.\n");
                        fdisk = 1;
                }
                        fprintf(flog, "Manual FDISK selected.\n");
                        fdisk = 1;
                }
-               if (strstr (line, "nopcmcia") == NULL) {
-                       fprintf(flog, "Initializing PCMCIA controllers.\n");
-                       pcmcia = initialize_pcmcia();
-                       if (pcmcia) {
-                               fprintf (flog, "Detected PCMCIA Controller: %s.\n", pcmcia);
-                               sprintf(commandstring, "/sbin/modprobe %s", pcmcia);
-                               mysystem("/sbin/modprobe pcmcia_core");
-                               mysystem(commandstring);
-                               mysystem("/sbin/modprobe ds");
-                               /* pcmcia netcard drivers are not available from Boot floppy,
-                                * they will be loaded from Drivers floppy later */
-                       } else {
-                               fprintf (flog, "Detected No PCMCIA Controller.\n");
-                       }
-               } else {
-                       fprintf(flog, "Skipping PCMCIA detection.\n");
-               }
                if (strstr (line, "nousb") == NULL) {
                        fprintf(flog, "Initializing USB controllers.\n");
                        initialize_usb();
                if (strstr (line, "nousb") == NULL) {
                        fprintf(flog, "Initializing USB controllers.\n");
                        initialize_usb();
@@ -697,30 +680,6 @@ int main(int argc, char *argv[])
        /* Rename uname */
        rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname");
 
        /* Rename uname */
        rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname");
 
-       /* Write PCMCIA Config */
-       if (pcmcia) {
-               handle = fopen("/harddisk/etc/modules.conf", "a");
-               if (handle != NULL) {
-                       fprintf (handle, "# PCMCIA Settings\n");
-                       fprintf (handle, "alias pcmcia-controller %s\n", pcmcia);
-                       fclose(handle);
-               }
-       }
-
-       handle = fopen("/harddisk/etc/pcmcia.conf", "w");
-       if (handle != NULL) {
-               if (pcmcia) {
-                       fprintf (handle, "PCMCIA=yes\n");
-                       fprintf (handle, "PCIC=%s\n", pcmcia);
-               } else {
-                       fprintf (handle, "PCMCIA=no\n");
-                       fprintf (handle, "PCIC=\n");
-               }
-               fprintf (handle, "CARDMGR_OPTS=\n");
-               fprintf (handle, "SCHEME=\n");
-               fclose(handle);
-       }
-
        /* *always* write disk configuration */
        if (!(write_disk_configs(&hdparams))){
          errorbox(ctr[TR_ERROR_WRITING_CONFIG]);
        /* *always* write disk configuration */
        if (!(write_disk_configs(&hdparams))){
          errorbox(ctr[TR_ERROR_WRITING_CONFIG]);
index 665e0d040612b1b40a6235c72e9ea5df5d543112..0c5c3d545e3e6ce02e2d037fe330ad81cdc541cc 100644 (file)
@@ -24,89 +24,47 @@ extern struct nic nics[];
 
 int networkmenu(struct keyvalue *ethernetkv)
 {
 
 int networkmenu(struct keyvalue *ethernetkv)
 {
-       int i;
-       int count;
-       char nics;
-       char number;
-       char cbValue;
+       int rc;
        char driver[STRING_SIZE] = "";
        char driveroptions[STRING_SIZE] = "";
        char driver[STRING_SIZE] = "";
        char driveroptions[STRING_SIZE] = "";
-       struct keyvalue *kv = initkeyvalues();
        int result = 0;
        char commandstring[STRING_SIZE];
        char address[STRING_SIZE], netmask[STRING_SIZE];
        int result = 0;
        char commandstring[STRING_SIZE];
        char address[STRING_SIZE], netmask[STRING_SIZE];
-       FILE *handle;
+       int done;
        char description[1000];
        char message[1000];
        char title[STRING_SIZE];
        char description[1000];
        char message[1000];
        char title[STRING_SIZE];
+       done = 0;
 
 
-       /* Detect and count nics */
-       count = mysystem("/bin/probenic.sh count");
-       fprintf(flog, "Number of detected nics: %s\n", count);
-
-/*     sprintf(commandstring, "/bin/probenic.sh");
-       sprintf(message, ctr[TR_PROBING_FOR_NICS]);
-       runcommandwithstatus(commandstring, message); */
-
-/*     handle = fopen("/nicdriver", "r");
-       fgets(nics, STRING_SIZE, handle);
-       fclose(handle); */
-
-/*     fprintf(flog, "Detected NIC drivers: %s\n",driver); */
-
-/*     sprintf (title, "%s %s - %s", NAME, VERSION, SLOGAN);
-       sprintf(message, ctr[TR_FOUND_NIC], NAME, description);
-       newtWinMessage(title, ctr[TR_OK], message); */
-
-       newtComponent form, checkbox, rb[count], button;
-       newtOpenWindow(10, 5, 60, 11, "Checkboxes and Radio buttons");
-
-       for (i = 1; i <= 2; i++)
+       while (!done)
        {
        {
-               fprintf(flog, "Scan: %d\n", i);
-               snprintf(commandstring, STRING_SIZE, "/bin/probenic.sh %i", i);
-               mysystem(commandstring);
-               if ((handle = fopen("/nicdriver", "r")) == NULL) {
-                       errorbox(ctr[TR_ERROR]);
-                       goto EXIT;
-               }
-               fgets(driver, STRING_SIZE, handle);
-               fclose(handle);
-               findnicdescription(driver, description);
-               if ( i == 0 )
-                       rb[i] = newtRadiobutton(1, i+2, description, 1, NULL);
+               rc = newtWinTernary(ctr[TR_CONFIGURE_NETWORKING], ctr[TR_PROBE], 
+                       ctr[TR_SELECT], ctr[TR_CANCEL], ctr[TR_CONFIGURE_NETWORKING_LONG]);
+               
+               if (rc == 0 || rc == 1)
+               {
+                       probecards(driver, driveroptions);
+                       if (!strlen(driver))
+                               errorbox(ctr[TR_PROBE_FAILED]);
+                       else
+                       {
+                               findnicdescription(driver, description);
+                               sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
+                               sprintf(message, ctr[TR_FOUND_NIC], NAME, description);
+                               newtWinMessage(title, ctr[TR_OK], message);
+                       }               
+               }                       
+               else if (rc == 2)
+                       choosecards(driver, driveroptions);
                else
                else
-                       rb[i] = newtRadiobutton(1, i+2, description, 0, rb[i-1]);
-       }
-       button = newtButton(1, count+3, "OK");
-
-       form = newtForm(NULL, NULL, 0);
-       newtFormAddComponent(form, checkbox);
-       for (i = 1; i <= 2; i++) {
-               fprintf(flog, "Add: %d\n", i);
-               newtFormAddComponent(form, rb[i]);
+                       done = 1;       
+                       
+               if (strlen(driver))
+                       done = 1;
        }
        }
-       newtFormAddComponent(form, button);
-
-       newtRunForm(form);
-       newtFinished();
-
-       for (i = 1; i <= 2; i++)
-               if (newtRadioGetCurrent(rb[0]) == rb[i])
-                       printf("radio button picked: %d\n", i);
-       newtFormDestroy(form);
-
-
-/*     snprintf(commandstring, STRING_SIZE, "/bin/probenic.sh 1");
-       mysystem(commandstring);        
-       if ((handle = fopen("/nicdriver", "r")) == NULL) {
-               errorbox(ctr[TR_ERROR]);
+       
+       if (!strlen(driver))
                goto EXIT;
                goto EXIT;
-       }
-       fgets(driver, STRING_SIZE, handle);
-       fprintf(flog, "Green nic driver: %s\n", driver);
-       fclose(handle); */
 
        /* Default is a GREEN nic only. */
        /* Smoothie is not untarred yet, so we have to delay actually writing the
 
        /* Default is a GREEN nic only. */
        /* Smoothie is not untarred yet, so we have to delay actually writing the
@@ -134,8 +92,6 @@ int networkmenu(struct keyvalue *ethernetkv)
        result = 1;
        
 EXIT:
        result = 1;
        
 EXIT:
-       freekeyvalues(kv);
        
        return result;
 }
        
        return result;
 }
-
index ca033993fd5bca362d535addb8b28d308465b597..5008def61777c13f01e6b0f9d21106ec5bcfff4f 100644 (file)
@@ -3,7 +3,8 @@
 MODULES=$(/bin/kudzu -qps  -t 30 -c NETWORK | grep driver | cut -d ' ' -f 2 | sort)
 
 if [ "$1" == "count" ]; then
 MODULES=$(/bin/kudzu -qps  -t 30 -c NETWORK | grep driver | cut -d ' ' -f 2 | sort)
 
 if [ "$1" == "count" ]; then
-       echo $(echo $MODULES | wc -l)
+       /bin/kudzu -qps  -t 30 -c NETWORK | grep driver | wc -l | awk '{ print $1 }' > /drivercount
+       exit 0
 else
        NUMBER=$1
 fi
 else
        NUMBER=$1
 fi
index 5ed2dfcd21c5163dd62f8c1baddb424c6f057c30..22d0b073b05bc4984a53baa4767853e70ad9f8fa 100644 (file)
-/* SmoothWall libsmooth.\r
- *\r
- * This program is distributed under the terms of the GNU General Public\r
- * Licence.  See the file COPYING for details.\r
- *\r
- * (c) Lawrence Manning, 2001\r
- * Contains prototypes for library functions.\r
- * \r
- * $Id: libsmooth.h,v 1.4.2.3 2005/10/30 23:25:35 franck78 Exp $\r
- * \r
- */\r
-\r
-#ifndef ___LIBSMOOTH_H\r
-#define ___LIBSMOOTH_H\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <ctype.h>\r
-#include <wchar.h>\r
-#include <locale.h>\r
-#include <unistd.h>\r
-#include <sys/file.h>\r
-#include <sys/types.h>\r
-#include <sys/stat.h>\r
-#include <fcntl.h>\r
-#include <newt.h>\r
-#include <dirent.h>\r
-#include <sys/mount.h>\r
-\r
-#include <sys/socket.h>\r
-#include <netinet/in.h>\r
-#include <arpa/inet.h>\r
-\r
-#include <linux/cdrom.h>\r
-#include <sys/ioctl.h>\r
-\r
-#include "langs.h"\r
-\r
-#define STRING_SIZE 1023\r
-\r
-#define ADDRESS 0\r
-#define NETADDRESS 1\r
-#define NETMASK 2\r
-#define DHCP 3\r
-#define NETCHANGE_TOTAL 4\r
-\r
-struct keyvalue\r
-{\r
-       char key[STRING_SIZE];\r
-       char value[STRING_SIZE];\r
-       struct keyvalue *next;  \r
-};\r
-\r
-/* for stuff in net.c */\r
-struct nic\r
-{\r
-       char *description;\r
-       char *modulename;\r
-};\r
-\r
-/* libsmooth.c */\r
-void reboot(void);\r
-void stripnl(char *s);\r
-int mysystem(char *command);\r
-void errorbox(char *message);\r
-void statuswindow(int width, int height, char *title, char *text, ...);\r
-int runcommandwithprogress(int width, int height, char *title, char *command,\r
-       int lines, char *text, ...);\r
-int runcommandwithstatus(char *command, char *message);\r
-int runhiddencommandwithstatus(char *command, char *message);\r
-int checkformodule(char *module); \r
-int replace(char filename1[], char *from, char *to);\r
-char* get_version(void);\r
-                                \r
-/* netstuff.c */\r
-int changeaddress(struct keyvalue *kv, char *colour, int typeflag,\r
-       char *defaultdhcphostname);\r
-int gettype(char *type);\r
-int setnetaddress(struct keyvalue *kv, char *colour);\r
-void networkdialogcallbacktype(newtComponent cm, void *data);\r
-int interfacecheck(struct keyvalue *kv, char *colour);\r
-int probecards(char *driver, char *driveroptions);\r
-int choosecards(char *driver, char *driveroptions);\r
-int manualdriver(char *driver, char *driveroptions);\r
-int countcards(void);\r
-int findnicdescription(char *modulename, char *description);\r
-         \r
-/* data.c */\r
-struct keyvalue *initkeyvalues(void);\r
-void freekeyvalues(struct keyvalue *head);\r
-int readkeyvalues(struct keyvalue *head, char *filename);\r
-int writekeyvalues(struct keyvalue *head, char *filename);\r
-int findkey(struct keyvalue *head, char *key, char *value);\r
-void appendkeyvalue(struct keyvalue *head, char *key, char *value);\r
-void replacekeyvalue(struct keyvalue *head, char *key, char *value);\r
-\r
-#endif\r
-\r
+/* SmoothWall libsmooth.
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence.  See the file COPYING for details.
+ *
+ * (c) Lawrence Manning, 2001
+ * Contains prototypes for library functions.
+ * 
+ * $Id: libsmooth.h,v 1.4.2.3 2005/10/30 23:25:35 franck78 Exp $
+ * 
+ */
+
+#ifndef ___LIBSMOOTH_H
+#define ___LIBSMOOTH_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <wchar.h>
+#include <locale.h>
+#include <unistd.h>
+#include <sys/file.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <newt.h>
+#include <dirent.h>
+#include <sys/mount.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <linux/cdrom.h>
+#include <sys/ioctl.h>
+
+#include "langs.h"
+
+#define STRING_SIZE 1023
+
+#define ADDRESS 0
+#define NETADDRESS 1
+#define NETMASK 2
+#define DHCP 3
+#define NETCHANGE_TOTAL 4
+
+struct keyvalue
+{
+       char key[STRING_SIZE];
+       char value[STRING_SIZE];
+       struct keyvalue *next;  
+};
+
+/* for stuff in net.c */
+struct nic
+{
+       char *description;
+       char *modulename;
+};
+struct driver
+{
+       char *description;
+       char *modulename;
+};
+
+/* libsmooth.c */
+void reboot(void);
+void stripnl(char *s);
+int mysystem(char *command);
+void errorbox(char *message);
+void statuswindow(int width, int height, char *title, char *text, ...);
+int runcommandwithprogress(int width, int height, char *title, char *command,
+       int lines, char *text, ...);
+int runcommandwithstatus(char *command, char *message);
+int runhiddencommandwithstatus(char *command, char *message);
+int checkformodule(char *module); 
+int replace(char filename1[], char *from, char *to);
+char* get_version(void);
+                                
+/* netstuff.c */
+int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
+       char *defaultdhcphostname);
+int gettype(char *type);
+int setnetaddress(struct keyvalue *kv, char *colour);
+void networkdialogcallbacktype(newtComponent cm, void *data);
+int interfacecheck(struct keyvalue *kv, char *colour);
+int probecards(char *driver, char *driveroptions);
+int choosecards(char *driver, char *driveroptions);
+int manualdriver(char *driver, char *driveroptions);
+int countcards(void);
+int findnicdescription(char *modulename, char *description);
+         
+/* data.c */
+struct keyvalue *initkeyvalues(void);
+void freekeyvalues(struct keyvalue *head);
+int readkeyvalues(struct keyvalue *head, char *filename);
+int writekeyvalues(struct keyvalue *head, char *filename);
+int findkey(struct keyvalue *head, char *key, char *value);
+void appendkeyvalue(struct keyvalue *head, char *key, char *value);
+void replacekeyvalue(struct keyvalue *head, char *key, char *value);
+
+#endif
+
index d54a89c60e2161f3664cc48e9eb9f0ef321fc3c5..ae9948b28ac81455ff952d93197705355ec507d2 100644 (file)
@@ -284,33 +284,11 @@ int replace(char filename1[], char *from, char *to)
 /* Include enabled languages */
 #ifdef  LANG_EN_ONLY
         #include "lang_en.c"
 /* Include enabled languages */
 #ifdef  LANG_EN_ONLY
         #include "lang_en.c"
-#elifdef       LANG_ALL
-       #include "lang_bz.c"
-       #include "lang_cs.c"
-       #include "lang_da.c"
-       #include "lang_de.c"
-       #include "lang_en.c"
-       #include "lang_es.c"
-       #include "lang_fi.c"
-       #include "lang_fr.c"
-       #include "lang_el.c"
-       #include "lang_it.c"
-       #include "lang_hu.c"
-       #include "lang_la.c"
-       #include "lang_nl.c"
-       #include "lang_no.c"
-       #include "lang_pl.c"
-       #include "lang_pt.c"
-       #include "lang_sk.c"
-       #include "lang_so.c"
-       #include "lang_sv.c"
-       #include "lang_tr.c"
-       #include "lang_vi.c"
 #else
        #include "lang_de.c"
        #include "lang_en.c"
 #else
        #include "lang_de.c"
        #include "lang_en.c"
-
 #endif
 #endif
+
 // returns a pointer to the actual running version number of IPFire.
 // Successive updates increase effective version but not VERSION !
 char g_title[STRING_SIZE] = "";
 // returns a pointer to the actual running version number of IPFire.
 // Successive updates increase effective version but not VERSION !
 char g_title[STRING_SIZE] = "";
@@ -321,7 +299,7 @@ char* get_version(void) {
                fclose (f_title);
                if (g_title[strlen(g_title) - 1] == '\n') g_title[strlen(g_title) - 1] = '\0';
        } else {
                fclose (f_title);
                if (g_title[strlen(g_title) - 1] == '\n') g_title[strlen(g_title) - 1] = '\0';
        } else {
-               sprintf (g_title, "%s v%s - %s", NAME, VERSION, SLOGAN);
+               sprintf (g_title, "%s %s - %s", NAME, VERSION, SLOGAN);
        }
        return g_title;
 }
        }
        return g_title;
 }
index 81ea3df568ca76cc0b9e3f2501afac1bdeb3d1ad..09a39a8f1d916d750f75b9c5107f086cefb751ad 100644 (file)
@@ -413,30 +413,88 @@ struct nic nics[] = {
 /* Funky routine for loading all drivers (cept those are already loaded.). */
 int probecards(char *driver, char *driveroptions)
 {
 /* Funky routine for loading all drivers (cept those are already loaded.). */
 int probecards(char *driver, char *driveroptions)
 {
+       int c;
+       char **sections;
+       char drivercount;
+       int rc;
+       int choice;
+       int done = 0;
        char message[1000];
        char commandstring[STRING_SIZE];
        FILE *handle;
        char line[STRING_SIZE];
 
        char message[1000];
        char commandstring[STRING_SIZE];
        FILE *handle;
        char line[STRING_SIZE];
 
-       sprintf(commandstring, "/bin/probenic.sh 1");
-       sprintf(message, ctr[TR_PROBING_FOR_NICS]);
-       runcommandwithstatus(commandstring, message);
+       /* Count all nics. */
+       mysystem("/bin/probenic.sh count");
+       if ((handle = fopen("/drivercount", "r")))
+               fgets(line, STRING_SIZE-1, handle);
+       fclose(handle);
+       //system("rm -f /drivercount");
+       line[strlen(line) - 1] = 0;
+       drivercount = strtok(line, ".");
+       fprintf(flog, "Detected %s NICs in your system.\n", drivercount);
+       if (!drivercount > 0) {
+               return 1;
+       }
+
+       sections = malloc(drivercount * sizeof(char *));
+
+       struct driver drivers[drivercount];
+       strcpy(drivers[0].modulename, "pcnet32");
 
 
-       if ((handle = fopen("/nicdriver", "r")))
+       fprintf(flog, "TEST0.\n");
+       c = 0;
+       while (drivers[c - 1].modulename)
        {
        {
-               char *driver;
-               fgets(line, STRING_SIZE-1, handle);
-               fclose(handle);
-               line[strlen(line) - 1] = 0;
-               driver = strtok(line, ".");
-               fprintf(flog, "Detected NIC driver %s\n",driver);
-               if (strlen(driver) > 1) {
-                       strcpy(driveroptions, "");
-                       return 1;
-               }
+               sections[c] = drivers[c - 1].description;
+               fprintf(flog, "TEST1.\n");
+               c++;
        }
        }
+       sections[c] = NULL;
+       fprintf(flog, "TEST2.\n");
+       
        strcpy(driver, "");
        strcpy(driveroptions, "");
        strcpy(driver, "");
        strcpy(driveroptions, "");
+
+       done = 0; choice = 1;
+       while (!done)
+       {
+               rc = newtWinMenu(ctr[TR_SELECT_NETWORK_DRIVER],
+                       ctr[TR_SELECT_NETWORK_DRIVER_LONG], 50, 5, 5, 6,
+                       sections, &choice, ctr[TR_OK], ctr[TR_CANCEL], NULL);
+               if (rc == 0 || rc == 1)
+               {
+                       if (choice > 0)
+                       {
+                               /* Find module number, load module. */
+                               c = choice - 1; 
+               
+                               if (!checkformodule(nics[c].modulename))
+                               {
+                                       sprintf(commandstring, "/sbin/modprobe %s", nics[c].modulename);
+                                       sprintf(message, ctr[TR_LOOKING_FOR_NIC], nics[c].description);
+                                       if (runcommandwithstatus(commandstring, message) == 0)
+                                       {
+                                               strcpy(driver, nics[c].modulename);
+                                               strcpy(driveroptions, "");
+                                               done = 1;
+                                       }
+                                       else
+                                               errorbox(ctr[TR_UNABLE_TO_LOAD_DRIVER_MODULE]);
+                               }
+                               else
+                                       errorbox(ctr[TR_THIS_DRIVER_MODULE_IS_ALREADY_LOADED]);
+                       }
+                       else
+                       {
+                               manualdriver(driver, driveroptions);
+                               if (strlen(driver))
+                                       done = 1;
+                       }
+               }
+               else
+                       done = 1;       
+       }
        
        return 0;
 }
        
        return 0;
 }