On Saturday, January 19, 2019 3:36:15 PM CET Alarig Le Lay wrote:
> Hi,
> 
> On sam. 19 janv. 12:02:20 2019, J. Roeleveld wrote:
> > Not sure if you can use spaces in the name, but I have the following:
> > 
> > $ cat /etc/conf.d/net
> > #config_eno1="dhcp"
> > 
> > config_eno1="null"
> > vlans_eno1="10 15"
> > vlan10_name="adm"
> > vlan15_name="str"
> > rc_net_adm_need="net.eno1"
> > rc_net_str_need="net.eno1"
> > config_adm="10.55.16.44 netmask 255.255.255.0 broadcast 10.55.16.255"
> > routes_adm="default gw 10.55.16.68"
> > config_str="10.30.15.44 netmask 255.255.255.0 broadcast 10.30.15.255"
> > 
> > For this to work, configured the init-scripts as:
> > 
> > $ ls -l /etc/init.d/net.*
> > lrwxrwxrwx 1 root root     6 Jun 16  2016 /etc/init.d/net.adm -> net.lo
> > lrwxrwxrwx 1 root root     6 Jun 15  2016 /etc/init.d/net.eno1 -> net.lo
> > -rwxr-xr-x 1 root root 18514 Mar  2  2018 /etc/init.d/net.lo
> > lrwxrwxrwx 1 root root     6 Jun 16  2016 /etc/init.d/net.str -> net.lo
> > 
> > And only have to add "net.adm" and "net.str" to the runlevel.
> 
> I don’t want to change the name of my interfaces, but the equivalent of
> `ip link set ${if} alias "${whatever}"`.

Not sure if that is actually "supported" by netifrc.
You could add these commands in a postup() block.

Is there a specific benefit for just setting an "alias" like this?

--
Joost



Reply via email to