mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
fake also kernel-name if we renamed a netif
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
parent
ffd5c68937
commit
c44563817a
@ -290,6 +290,7 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
|
||||
if (retval != 0)
|
||||
goto exit;
|
||||
|
||||
info("renamed netif to '%s'", udev->name);
|
||||
/* we've changed the name, now fake the devpath, cause the
|
||||
* original kernel name sleeps with the fishes and we don't
|
||||
* get an event from the kernel with the new name
|
||||
@ -298,6 +299,7 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
|
||||
if (pos != NULL) {
|
||||
pos[1] = '\0';
|
||||
strlcat(udev->devpath, udev->name, sizeof(udev->devpath));
|
||||
strlcpy(udev->kernel_name, udev->name, sizeof(udev->kernel_name));
|
||||
setenv("DEVPATH", udev->devpath, 1);
|
||||
setenv("INTERFACE", udev->name, 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user