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#7158 - initscripts :: netcfg - support for exta options

Attached to Project: Arch Linux
Opened by Vlad Reikine (vreikine) - Monday, 14 May 2007, 14:31 GMT
Last edited by James Rayner (iphitus) - Tuesday, 15 May 2007, 10:29 GMT
Task Type Feature Request
Category System
Status Closed
Assigned To James Rayner (iphitus)
Architecture All
Severity Low
Priority Normal
Reported Version 0.8 Voodoo
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I use network profiles all the time and I modified my netcfg script to add more options in profiles. I included diff between your netcfg and mine. One change is obvious: current netcfg script handles only "nameserver" and "domain" options in resolv.conf, I added "search"and "options". If you work in networks with 2 or more domains you'd understand the need for "search" option.
Second change is to modify /etc/hosts file with local hostname. I have webserver running on the laptop (wiki pages) and hostname is part of URLs on many pages. Sometimes I work disconnected from network and for those cases I have to be able to resolve hostname via /etc/hosts. I am not sure it's completely fool-proof (I mean using "hostname with different options ) but it works for me.
Thanks,
Vlad

[root@vreikine03l ~]# diff /usr/bin/netcfg /usr/bin/netcfg.vlad
105c105
< unset GATEWAY HOSTNAME DOMAIN DNS1 DNS2
---
> unset GATEWAY HOSTNAME DOMAIN DNS1 DNS2 SEARCH DNSOPTS
169a170,175
> if [ "$MODIFY_HOSTS" ]; then
> sed "s/`hostname -s`\ //" /etc/hosts > /etc/hosts.mod
> mv /etc/hosts.mod /etc/hosts
> sed "s/`hostname -f`/`hostname -s`\ `hostname -f`/" /etc/hosts > /etc/hosts.mod
> mv /etc/hosts.mod /etc/hosts
> fi
177a184,185
> [ "$SEARCH" ] && echo "search $SEARCH" >>/etc/resolv.conf
> [ "$DNSOPTS" ] && echo "options $DNSOPTS" >>/etc/resolv.conf
This task depends upon

Closed by  James Rayner (iphitus)
Tuesday, 15 May 2007, 10:29 GMT
Reason for closing:  Implemented
Additional comments about closing:  implemented in new network scripts

See 'Network Scripts' page on wiki for details.
Comment by Roman Kyrylych (Romashka) - Monday, 14 May 2007, 19:25 GMT
Isn't this already implemented in the newest network scripts, James? Then we can close it.

Loading...