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 14c8d39cf7b45110ed25317393cf6b55064951df..84d0ab2204e262cd40f27119df3de82d5fe1109d 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);
 
                                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) {
                        /* now fake the devpath, because the kernel name changed silently */
                        pos = strrchr(udev->dev->devpath, '/');
                        if (pos != NULL) {