diff options
author | Bill Nottingham <notting@redhat.com> | 2006-07-01 04:30:07 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2006-07-01 04:30:07 +0000 |
commit | d243296eb1a05e1a458830981953bac84447617e (patch) | |
tree | b32d16c0c9aa1e125e35d08c7391916c55cb5abe | |
parent | 98ff30f0077b9fe78ba1ddda1dc7cc6faaa17188 (diff) | |
download | initscripts-d243296eb1a05e1a458830981953bac84447617e.tar initscripts-d243296eb1a05e1a458830981953bac84447617e.tar.gz initscripts-d243296eb1a05e1a458830981953bac84447617e.tar.bz2 initscripts-d243296eb1a05e1a458830981953bac84447617e.tar.xz initscripts-d243296eb1a05e1a458830981953bac84447617e.zip |
backport fix
-rw-r--r-- | src/rename_device.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rename_device.c b/src/rename_device.c index 9db4d41f..00b14475 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -142,6 +142,9 @@ struct netdev *get_configs() { for (i = 0; lines[i]; i++) { if (g_str_has_prefix(lines[i],"DEVICE=")) { devname = lines[i] + 7; + /* ignore alias devices */ + if (strchr(devname,':')) + devname = NULL; } if (g_str_has_prefix(lines[i],"HWADDR=")) { hwaddr = lines[i] + 7; @@ -230,8 +233,12 @@ void rename_device(char *src, char *target, struct netdev *current) { struct netdev *i, *tmpdev; hw = get_hwaddr(target); - if (!hw) - return; + if (!hw) { + devs = get_devs(); + hw = get_hwaddr(target); + if (!hw) + return; + } nconfig = get_config_by_hwaddr(hw); curdev = get_device_by_hwaddr(hw); |