mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
setup: Remove writing udev rules for network interfaces
This commit is contained in:
@@ -527,27 +527,6 @@ int rename_nics(void) {
|
||||
}
|
||||
}
|
||||
|
||||
int create_udev(void)
|
||||
{
|
||||
#define UDEV_NET_CONF "/etc/udev/rules.d/30-persistent-network.rules"
|
||||
FILE *fp;
|
||||
int i;
|
||||
|
||||
if ( (fp = fopen(UDEV_NET_CONF, "w")) == NULL ) {
|
||||
fprintf(stderr,"Couldn't open" UDEV_NET_CONF);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < 4 ; i++)
|
||||
{
|
||||
if (strcmp(knics[i].macaddr, "")) {
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_configs_netudev(int card , int colour)
|
||||
{
|
||||
char commandstring[STRING_SIZE];
|
||||
|
||||
@@ -117,7 +117,6 @@ int handlenetworking(void)
|
||||
} else {
|
||||
rename_nics();
|
||||
}
|
||||
create_udev();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,6 @@ void networkdialogcallbacktype(newtComponent cm, void *data);
|
||||
int interfacecheck(struct keyvalue *kv, char *colour);
|
||||
int rename_nics(void);
|
||||
int init_knics(void);
|
||||
int create_udev(void);
|
||||
int scan_network_cards(void);
|
||||
int nicmenu(int colour);
|
||||
int clear_card_entry(int cards);
|
||||
|
||||
Reference in New Issue
Block a user