ALT Linux Bugzilla
– Attachment 8236 Details for
Bug 32167
Сделать возможность выбора базового названия для имени интерфайса
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
патч для замены eth на ether по умолчанию
write_net_rules.diff (text/plain), 1.14 KB, created by
Sergey Y. Afonin
on 2019-08-18 13:29:45 MSK
(
hide
)
Description:
патч для замены eth на ether по умолчанию
Filename:
MIME Type:
Creator:
Sergey Y. Afonin
Created:
2019-08-18 13:29:45 MSK
Size:
1.14 KB
patch
obsolete
>--- write_net_rules.orig 2018-04-05 22:57:00.000000000 +0400 >+++ write_net_rules 2019-08-18 14:08:46.057054843 +0400 >@@ -1,4 +1,4 @@ >-#!/bin/sh -e >+#!/bin/bash -e > > # This script is run to create persistent network device naming rules > # based on properties of the device. >@@ -42,6 +42,8 @@ > > . /lib/udev/rule_generator.functions > >+[ -f /etc/sysconfig/write_net_rules] && . /etc/sysconfig/write_net_rules >+ > interface_name_taken() { > local value="$(find_all_rules 'NAME=' $INTERFACE)" > if [ "$value" ]; then >@@ -117,6 +119,20 @@ > basename=${INTERFACE%%[0-9]*} > match="$match, KERNEL==\"$basename*\"" > >+ETHERDEFAULT=${ETHERDEFAULT:-ether} >+ >+if [ "$ETHERDEFAULT" != "eth" ]; then >+ if [ "$basename" = "eth" ]; then >+ basename="$ETHERDEFAULT" >+ fi >+ if [[ $INTERFACE_NAME =~ (eth)([0-9]+) ]]; then >+ INTERFACE_NAME="$ETHERDEFAULT${BASH_REMATCH[2]}" >+ fi >+ if [[ $INTERFACE =~ (eth)([0-9]+) ]]; then >+ INTERFACE="$ETHERDEFAULT${BASH_REMATCH[2]}" >+ fi >+fi >+ > if [ "$INTERFACE_NAME" ]; then > # external tools may request a custom name > COMMENT="$COMMENT (custom name provided by external tool)"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32167
: 8236