Ask Your Question

Is it possible to add quickly add persistent net rules to Fedora 22?

asked 2015-11-19 14:21:44 -0500

afyr gravatar image

updated 2015-11-19 18:00:35 -0500

Is it possible to add something equivalent to 75-persistent-net-generator.rules//lib/udev/write_net_rules to Fedora 22? We have systems that are currently using /etc/udev/rules.d/70-persistent-net.rules which is dependent on 75-persistent-net-generator.rules to get generated. Of course we could update everything to use biosdevname or net.ifnames, but a lot of systems would have to change and it would get messy.

edit retag flag offensive close merge delete


What are you trying to accomplish exactly ? Can you post your rules ?

bodhi.zazen gravatar imagebodhi.zazen ( 2015-11-20 07:49:16 -0500 )edit

I would like to use the old style ethernet names (eth0...ethN). The whole problem is I don't have a rules file, but I would like to use the one that was generated in previous versoins of Linux. I appreciate any advice you have may have.

afyr gravatar imageafyr ( 2015-11-20 11:25:23 -0500 )edit
sergiomb gravatar imagesergiomb ( 2015-12-03 18:47:33 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-11-24 10:33:34 -0500

afyr gravatar image

updated 2015-12-03 16:30:54 -0500

Installing the following files from Fedora 15 (with a few tweaks described below) helped me regenerate 70-persistent-net.rules in Fedora 22:


In /lib/udev/rule_generator.functions:

RUNDIR=$(udevadm info --run)

Changed to:


Since --run is no longer defined.

In /lib/udev/write_net_rules, commented out:

match="$match, KERNEL==\"$basename*\""

Since the name may be the old-style eth* or new style en. Fedora uses eth names and, per their documentation, its use is discouraged in rules files. So I initially name the interfaces with the prefix lan* and then rename them using the service described here. Also, added this short if block after basename assignment:

# Re-map new basename (en, wl, etc) to old style (eth, wlan)
if [[ $basename == "en"* ]]; then # If installed before boot   
elif [[ $basename == "eth"* ]]; then # If installed after boot
elif [[ $basename == "wl"* ]]; then
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-11-19 14:21:44 -0500

Seen: 399 times

Last updated: Dec 03 '15