Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] netifrc & system init actions
Date: Fri, 30 Jan 2015 12:08:40
Message-Id: 20150130120828.3f430bba@digimed.co.uk
In Reply to: [gentoo-user] netifrc & system init actions by Oleg
1 On Fri, 30 Jan 2015 12:26:49 +0300, Oleg wrote:
2
3 > I need to have some ip policy rules at system startup which isn't
4 > depend on any interface. In debian i do this
5 > through /etc/network/interfaces - i add needed rules as post-up actions
6 > to lo interface.
7 >
8 > In gentoo i've made postup() in /etc/conf.d/net:
9 >
10 > postup()
11 > {
12 > if [ "${IFACE}" = "lo" ]; then
13 [snip]
14 > fi
15 > return 0;
16 > }
17 >
18 > and done:
19 >
20 > rc-update add net.lo default
21 >
22 > Is this the right way to do this?
23
24 If you want those commands run when lo comes up, yes.
25
26
27 --
28 Neil Bothwick
29
30 "I need your clothes, your boots, and your tagline!"

Replies

Subject Author
Re: [gentoo-user] netifrc & system init actions Oleg <lego12239@××××××.ru>