biosdevname-0.5.0-2

- not only NAME KERNEL=="eth*", but every ethernet device
This commit is contained in:
Harald Hoyer 2013-09-02 19:16:32 +02:00
parent 31d243f55f
commit 378eb30853
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,21 @@
diff -up biosdevname-0.5.0/biosdevname.rules.in.new biosdevname-0.5.0/biosdevname.rules.in
--- biosdevname-0.5.0/biosdevname.rules.in.new 2013-03-12 13:26:06.000000000 +0100
+++ biosdevname-0.5.0/biosdevname.rules.in 2013-09-02 19:07:01.953956219 +0200
@@ -1,7 +1,8 @@
SUBSYSTEM!="net", GOTO="netdevicename_end"
-KERNEL!="eth*", GOTO="netdevicename_end"
ACTION!="add", GOTO="netdevicename_end"
NAME=="?*", GOTO="netdevicename_end"
+ATTR{type}!="1", GOTO="netdevicename_end"
+ENV{DEVTYPE}=="?*", GOTO="netdevicename_end"
# kernel command line "biosdevname={0|1}" can turn off/on biosdevname
IMPORT{cmdline}="biosdevname"
@@ -18,6 +19,6 @@ LABEL="netdevicename_start"
# using NAME= instead of setting INTERFACE_NAME, so that persistent
# names aren't generated for these devices, they are "named" on each boot.
-PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
+SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
LABEL="netdevicename_end"

View File

@ -1,6 +1,6 @@
Name: biosdevname
Version: 0.5.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Udev helper for naming devices per BIOS names
Group: System Environment/Base
@ -21,6 +21,8 @@ BuildRequires: automake
# for ownership of /etc/udev/rules.d
Requires: udev
Patch1: biosdevname-0.5.0-rules.patch
%description
biosdevname in its simplest form takes a kernel device name as an
argument, and returns the BIOS-given name it "should" be. This is necessary
@ -30,6 +32,7 @@ name (e.g. eth0).
%prep
%setup -q
%patch1 -p1
%build
#If configure script doesn't exist generate it with autogen script
@ -53,6 +56,9 @@ make install install-data DESTDIR=%{buildroot}
%changelog
* Mon Sep 02 2013 Harald Hoyer <harald@redhat.com> 0.5.0-2
- not only NAME KERNEL=="eth*", but every ethernet device
* Tue Jul 30 2013 Václav Pavlín <vpavlin@redhat.com> - 0.5.0-1
- Updating the sources to 0.5.0 version. Following are the changes:
- Change scan of SMBIOS slot <-> PCI methods, recurse to set SMBIOS slot field