Re: ipv6
John Crowhurst <[email protected]>
| Newsgroups | gmane.linux.slackware |
|---|---|
| Message-ID | <[email protected]> |
On 02/03/2014 12:08, Gil André wrote: > Hey, > > On 01 Mar 2014, at 17:00, Andreas Vögele <[email protected]> wrote: > >> Nick Edwards <[email protected]> writes: >> >>> [...] This is not for home use, I have them assigned by editing >>> rc.inet1 which we know, we should never do since it will be overwrote >>> every update >> rc.inet1 and rc.wireless are both marked as configuration files and >> won't be overwritten by default. Furthermore, there's no need to >> install the wireless-tools package, which provides the regular >> rc.wireless script, on servers. Just create your own script of that >> name and it will never be touched by any package management tool. > Sticking IPv6 in rc.wireless, even if said file is never overwritten > by upgrading tools, and even if it is not needed on a server-class > machine, strikes me as a pretty poor hack. Useful, yes, but definitely > not a clean solution. > > I tend to agree with Nick & Noel here: what is needed is either a set > of IPV6-specific rc scripts or (even better) integration of IPv6 functions > in the standard rc.inet1 scripts. > > — Gil. > Hi, I would replace the ip_up function of Noel's rc.ipv6 script with something like: files=/etc/rc.d/rc.ipv6conf/*.conf for f in $files; do if [ -f "$f" ]; then source $f /usr/sbin/ip addr add $sub_ip dev $intf /usr/sbin/ip addr add $pri_ip dev $intf fi done So for /etc/rc.d/rc.ipv6conf/darkstar.conf: # IPv6 Config file for darkstar.org, create a new one using this template for your IP address or hostname # Your interface, such as eth0 intf=eth0 # Sub IP v6 address sub_ip=2001:xxxxxxxxxx:7/64 # Primary IPv6 address pri_ip=2001:xxxxxxxxxx:dba/64 darkstar.conf (with its variables commented out) could be used as a dummy file that can be installed and upgraded without affecting the real config files you create for your IP addresses in that folder. Best, John