mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
setup: change persistent network rules for new udev.
This commit is contained in:
@@ -532,7 +532,7 @@ int create_udev(void)
|
||||
for (i = 0 ; i < 4 ; i++)
|
||||
{
|
||||
if (strcmp(knics[i].macaddr, "")) {
|
||||
fprintf(fp,"ACTION==\"add\", SUBSYSTEM==\"net\", SYSFS{type}==\"1\", SYSFS{address}==\"%s\", NAME=\"%s0\" # %s\n", knics[i].macaddr, lcolourcard[i], knics[i].description);
|
||||
fprintf(fp,"\n# %s\nACTION==\"add\", SUBSYSTEM==\"net\", ATTR{type}==\"1\", ATTR{address}==\"%s\", NAME=\"%s0\"\n", knics[i].description, knics[i].macaddr, lcolourcard[i]);
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
@@ -112,6 +112,8 @@ int handlenetworking(void)
|
||||
runcommandwithstatus("/etc/rc.d/init.d/network start",
|
||||
ctr[TR_PULLING_NETWORK_UP]);
|
||||
}
|
||||
} else {
|
||||
rename_nics();
|
||||
}
|
||||
create_udev();
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user