Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#3981 - rc.conf/network init script unable to cope with rename network interfaces containing '-'

Attached to Project: Arch Linux
Opened by Laurence Hurst (Loz_hurst) - Thursday, 16 February 2006, 14:59 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To No-one
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I renamed my two network interfaces to 'eth-nv' and 'eth-marv' using udev rules, and then modified rc.conf to relect these changes. I rebooted, but the interfaces did not come up. Manually running /etc/rc.d/network restart gives:

[14:42][root@sovereign laurence]# /etc/rc.d/network restart
/etc/rc.conf: line 58: eth-nv=dhcp: command not found
/etc/rc.conf: line 59: eth-marv=dhcp: command not found
/etc/rc.conf: line 58: eth-nv=dhcp: command not found
/etc/rc.conf: line 59: eth-marv=dhcp: command not found
/etc/rc.conf: line 58: eth-nv=dhcp: command not found
/etc/rc.conf: line 59: eth-marv=dhcp: command not found
:: Stopping Network [BUSY]
ifconfig: option `-marv' not recognised.
ifconfig: `--help' gives usage information.
[FAIL]
/etc/rc.conf: line 58: eth-nv=dhcp: command not found
/etc/rc.conf: line 59: eth-marv=dhcp: command not found
:: Starting Network [DONE]

the relevent lines from rc.conf are:
eth-nv="dhcp"
eth-marv="dhcp"
INTERFACES=(lo !eth-nv eth-marv)

renaming the interfaces to eth_nv and eth_marv works fine. Escaping the '-' with a \ or enclosing the iface names in quotes has no effect, so it seems to be a bug with the init scripts not coping with hyphens in interface names (udev likes it, and it works as expected on my debian system)
I hope it's not just me being special.
This task depends upon

Closed by  Judd Vinet (judd)
Thursday, 16 February 2006, 16:54 GMT
Reason for closing:  Won't fix
Comment by Jan de Groot (JGC) - Thursday, 16 February 2006, 15:10 GMT
This is because the initscripts use bash syntax. Bash does not like variables with dashes in it, underscores are fine though.
Comment by Judd Vinet (judd) - Thursday, 16 February 2006, 16:43 GMT
Yea, this is a bash thing. You can see it here:

[jvinet@mars ~]$ a-b="test"
bash: a-b=test: command not found
[jvinet@mars ~]$ a="test"
[jvinet@mars ~]$


No hyphens allowed. :( I can add a note about it in rc.conf.

Loading...