mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Padlock-Modul aktiviert fuer VIA Epia Boards
FAT Dateisystem fuer "Europa" angepasst Netzwerkerkennung durchgearbeitet git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@485 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -175,6 +175,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Starting hardware detection
|
||||
runcommandwithstatus("/bin/probehw.sh", ctr[TR_PROBING_HARDWARE]);
|
||||
runcommandwithstatus("/bin/probenic.sh install", ctr[TR_PROBING_HARDWARE]);
|
||||
|
||||
/* CDROM INSTALL */
|
||||
if (installtype == CDROM_INSTALL) {
|
||||
@@ -617,8 +618,12 @@ EXIT:
|
||||
fclose(flog);
|
||||
|
||||
if (!unattended) {
|
||||
// Copy our scanned nics to the disk and lock because scan doesn't work in chroot
|
||||
system("touch /harddisk/var/ipfire/ethernet/scan_lock");
|
||||
system("cp -f /tmp/scanned_nics /harddisk/var/ipfire/ethernet/scanned_nics");
|
||||
if (system("/sbin/chroot /harddisk /usr/local/sbin/setup /dev/tty2 INSTALL"))
|
||||
printf("Unable to run setup.\n");
|
||||
system("rm -f /harddisk/var/ipfire/ethernet/scan_lock");
|
||||
}
|
||||
|
||||
if (system("/bin/umount /harddisk/proc"))
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
hwinfo --netcard | egrep "Model|HW Address" | \
|
||||
awk -F": " '{ print $2 }' | sed -e '/..:..:..:..:..:../a\\' -e "s/$/\;/g" | \
|
||||
tr "\n" "XX" | sed -e "s/XX/\n/g" -e "s/\;X/\;/g" | \
|
||||
sort > /var/ipfire/ethernet/scanned_nics 2>/dev/null
|
||||
case "$1" in
|
||||
install)
|
||||
hwinfo --netcard | egrep "Model|HW Address" | \
|
||||
awk -F": " '{ print $2 }' | sed -e '/..:..:..:..:..:../a\\' | sed -e "s/$/\;/g" | \
|
||||
tr "\n" "XX" | sed -e "s/XX/\n/g" | sed -e "s/\;X/\;/g" | \
|
||||
sort > /tmp/scanned_nics 2>/dev/null
|
||||
;;
|
||||
"")
|
||||
if [ ! -e /var/ipfire/ethernet/scan_lock ]; then
|
||||
hwinfo --netcard | egrep "Model|HW Address" | \
|
||||
awk -F": " '{ print $2 }' | sed -e '/..:..:..:..:..:../a\\' -e "s/$/\;/g" | \
|
||||
tr "\n" "XX" | sed -e "s/XX/\n/g" -e "s/\;X/\;/g" | \
|
||||
sort > /var/ipfire/ethernet/scanned_nics 2>/dev/null
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
|
||||
@@ -409,12 +409,11 @@ int nicmenu(char *colour)
|
||||
mysystem("/bin/probenic.sh");
|
||||
|
||||
// Read the nics we already use
|
||||
if( (fp = fopen(KNOWN_NICS, "r")) == NULL )
|
||||
if((fp = fopen(KNOWN_NICS, "r")) == NULL)
|
||||
{
|
||||
fprintf(flog,"Couldn't open " KNOWN_NICS);
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (fgets(temp_line, STRING_SIZE, fp) != NULL)
|
||||
{
|
||||
strcpy(knics[kcount].description, strtok(temp_line,";"));
|
||||
@@ -495,7 +494,7 @@ int nicmenu(char *colour)
|
||||
return 0;
|
||||
} else {
|
||||
// We have to add here that you can manually add a device
|
||||
newtWinMessage("NetcardMenu", ctr[TR_OK], "Es wurden leider keine freien Netzwerkkarten fuer die Schnittstelle \"%s\" in ihrem System gefunden.", colour);
|
||||
errorbox("Es wurden leider keine freien Netzwerkkarten fuer die Schnittstelle in ihrem System gefunden.");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ int changedrivers(void)
|
||||
char temp[STRING_SIZE];
|
||||
int configtype;
|
||||
int green = 0, red = 0, blue = 0, orange = 0;
|
||||
|
||||
|
||||
if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
|
||||
{
|
||||
freekeyvalues(kv);
|
||||
@@ -387,12 +387,9 @@ int changedrivers(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy(temp, "0"); findkey(kv, "CONFIG_TYPE", temp);
|
||||
configtype = atol(temp);
|
||||
|
||||
runcommandwithstatus("/etc/rc.d/init.d/network stop red blue orange",
|
||||
ctr[TR_PUSHING_NON_LOCAL_NETWORK_DOWN]);
|
||||
|
||||
|
||||
if (configtype == 0)
|
||||
{ green = 1; }
|
||||
else if (configtype == 1)
|
||||
@@ -408,7 +405,7 @@ int changedrivers(void)
|
||||
else if (configtype == 6)
|
||||
{ green = 1; red = 1; blue = 1; }
|
||||
else if (configtype == 7)
|
||||
{ green = 1; red = 1; blue = 1; orange = 1;}
|
||||
{ green = 1; red = 1; blue = 1; orange = 1; }
|
||||
|
||||
if (green && !cardassigned("green"))
|
||||
nicmenu("green");
|
||||
|
||||
Reference in New Issue
Block a user