chiark / gitweb /
export INTERFACE_OLD if we renamed a netif
authorKay Sievers <kay.sievers@suse.de>
Thu, 6 Apr 2006 18:40:58 +0000 (20:40 +0200)
committerKay Sievers <kay.sievers@suse.de>
Thu, 6 Apr 2006 18:40:58 +0000 (20:40 +0200)
udev_device.c

index 14c8d39..84d0ab2 100644 (file)
@@ -149,6 +149,9 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev)
                                goto exit;
                        info("renamed netif to '%s'", udev->name);
 
+                       /* export old name */
+                       setenv("INTERFACE_OLD", udev->dev->kernel_name, 1);
+
                        /* now fake the devpath, because the kernel name changed silently */
                        pos = strrchr(udev->dev->devpath, '/');
                        if (pos != NULL) {