Gentoo Archives: gentoo-commits

From: "Bernard Cafarelli (voyageur)" <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/freenet6/files: gw6c.rc
Date: Wed, 27 Feb 2008 10:32:43
Message-Id: E1JUJaV-0000AN-RU@stork.gentoo.org
1 voyageur 08/02/27 10:32:35
2
3 Modified: gw6c.rc
4 Log:
5 Add tun module detection/load to init script
6 (Portage version: 2.1.4.4)
7
8 Revision Changes Path
9 1.3 net-misc/freenet6/files/gw6c.rc
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/freenet6/files/gw6c.rc?rev=1.3&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/freenet6/files/gw6c.rc?rev=1.3&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/freenet6/files/gw6c.rc?r1=1.2&r2=1.3
14
15 Index: gw6c.rc
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/net-misc/freenet6/files/gw6c.rc,v
18 retrieving revision 1.2
19 retrieving revision 1.3
20 diff -u -r1.2 -r1.3
21 --- gw6c.rc 26 Feb 2008 19:40:44 -0000 1.2
22 +++ gw6c.rc 27 Feb 2008 10:32:35 -0000 1.3
23 @@ -8,7 +8,22 @@
24 use dns logger
25 }
26
27 +checkconfig() {
28 + if [ $(uname -s) = "Linux" ] ; then
29 + if [ ! -e /dev/net/tun ]; then
30 + if ! modprobe tun ; then
31 + eerror "TUN/TAP support is not available" \
32 + "in this kernel"
33 + return 1
34 + fi
35 + fi
36 + fi
37 + return 0
38 +}
39 +
40 start() {
41 + checkconfig || return 1
42 +
43 ebegin "Starting Freenet6 IPv6 Client"
44 start-stop-daemon --start --quiet \
45 --exec $FREENET6_CLIENT -- -f /etc/freenet6/gw6c.conf
46
47
48
49 --
50 gentoo-commits@l.g.o mailing list