Crates.io | ifcfg-devname |
lib.rs | ifcfg-devname |
version | 1.1.1 |
source | src |
created_at | 2021-12-10 12:30:33.681658 |
updated_at | 2024-08-05 11:50:36.469351 |
description | Udev helper utility that provides network interface naming |
homepage | |
repository | https://github.com/fedora-sysv/ifcfg-devname |
max_upload_size | |
id | 495694 |
size | 79,941 |
Initscripts rename_device
binary rewritten using rust and renamed to ifcfg-devname
.
Program ifcfg-devname
reads ENV INTERFACE, which is expected to contain the name of the network interface. Then it looks for the hardware address of such an interface. After that it scans ifcfg configuration files in directory /etc/sysconfig/network-scripts/
and looks for configuration with HWADDR set to given hw address. If the program successfully finds such a configuration, it returns on standard output content of property DEVICE from matching ifcfg configuration. In all other cases it returns error code 1
.
This repository provides source code for ifcfg-devname
binary. The binary requires env INTERFACE to be set.
INTERFACE=eth0 cargo run --release
Environment variable INTERFACE takes name of the interface.