aboutsummaryrefslogtreecommitdiffstats
path: root/src/rename_device.c
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-11-02 08:53:27 +0100
committerBill Nottingham <notting@redhat.com>2011-11-02 14:18:17 -0400
commita13cf6f7955dcf526c1526e0b53d51cfaaaf40af (patch)
tree1d9a306ad8a7e4700ecda6bd3cb19372d532225c /src/rename_device.c
parentc3ec5b11d80923cc54d1553b394b596db28e2704 (diff)
downloadinitscripts-a13cf6f7955dcf526c1526e0b53d51cfaaaf40af.tar
initscripts-a13cf6f7955dcf526c1526e0b53d51cfaaaf40af.tar.gz
initscripts-a13cf6f7955dcf526c1526e0b53d51cfaaaf40af.tar.bz2
initscripts-a13cf6f7955dcf526c1526e0b53d51cfaaaf40af.tar.xz
initscripts-a13cf6f7955dcf526c1526e0b53d51cfaaaf40af.zip
rename_device: skip VLAN=yes configuration files
Diffstat (limited to 'src/rename_device.c')
-rw-r--r--src/rename_device.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rename_device.c b/src/rename_device.c
index 3cd25e1e..f96291b0 100644
--- a/src/rename_device.c
+++ b/src/rename_device.c
@@ -147,11 +147,13 @@ struct netdev *get_configs() {
for (x = 0; x < ncfgs; x++ ) {
char *path;
char *devname, *hwaddr;
+ int vlan;
gchar *contents, **lines;
int i;
devname = hwaddr = contents = NULL;
lines = NULL;
+ vlan = 0;
if (asprintf(&path,"/etc/sysconfig/network-scripts/%s",
cfgs[x]->d_name) == -1)
continue;
@@ -175,8 +177,11 @@ struct netdev *get_configs() {
hwaddr = dequote(lines[i] + 7, NULL);
}
#endif
+ if (g_str_has_prefix(lines[i],"VLAN=yes")) {
+ vlan=1;
+ }
}
- if (!devname || !hwaddr) {
+ if (!devname || !hwaddr || vlan) {
g_free(contents);
g_strfreev(lines);
continue;