setup: change persistent network rules for new udev.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 20 Nov 2013 06:37:51 +0000 (07:37 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 20 Nov 2013 06:37:51 +0000 (07:37 +0100)
src/install+setup/libsmooth/netstuff.c
src/install+setup/setup/networking.c

index 1c6eb42..8c6f3fa 100644 (file)
@@ -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);
index 9c13717..edd3c71 100644 (file)
@@ -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;