diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2008-02-27 10:32:35 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2008-02-27 10:32:35 +0000 |
commit | bfc6a519e1e654caa0073de13297aac0cae338e5 (patch) | |
tree | 175dcd5f73769b0d103896d51f7e814abc348f2a | |
parent | Add missing eutils inherit for enewgroup as pointed out by Shufeng Zheng. (diff) | |
download | gentoo-2-bfc6a519e1e654caa0073de13297aac0cae338e5.tar.gz gentoo-2-bfc6a519e1e654caa0073de13297aac0cae338e5.tar.bz2 gentoo-2-bfc6a519e1e654caa0073de13297aac0cae338e5.zip |
Add tun module detection/load to init script
(Portage version: 2.1.4.4)
-rw-r--r-- | net-misc/freenet6/ChangeLog | 5 | ||||
-rw-r--r-- | net-misc/freenet6/files/gw6c.rc | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/net-misc/freenet6/ChangeLog b/net-misc/freenet6/ChangeLog index 718edf86ac0d..a25c54ae72ab 100644 --- a/net-misc/freenet6/ChangeLog +++ b/net-misc/freenet6/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for net-misc/freenet6 # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/freenet6/ChangeLog,v 1.27 2008/02/27 10:07:38 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/freenet6/ChangeLog,v 1.28 2008/02/27 10:32:34 voyageur Exp $ + + 27 Feb 2008; Bernard Cafarelli <voyageur@gentoo.org> files/gw6c.rc: + Add tun module detection/load to init script, patch provided by jakub 27 Feb 2008; Bernard Cafarelli <voyageur@gentoo.org> freenet6-5.1.ebuild: Honor C[XX]FLAGS+LDFLAGS, many thanks to jakub in bug #211581 diff --git a/net-misc/freenet6/files/gw6c.rc b/net-misc/freenet6/files/gw6c.rc index 1f5b0c79b744..85ac76ad424a 100644 --- a/net-misc/freenet6/files/gw6c.rc +++ b/net-misc/freenet6/files/gw6c.rc @@ -8,7 +8,22 @@ depend() { use dns logger } +checkconfig() { + if [ $(uname -s) = "Linux" ] ; then + if [ ! -e /dev/net/tun ]; then + if ! modprobe tun ; then + eerror "TUN/TAP support is not available" \ + "in this kernel" + return 1 + fi + fi + fi + return 0 +} + start() { + checkconfig || return 1 + ebegin "Starting Freenet6 IPv6 Client" start-stop-daemon --start --quiet \ --exec $FREENET6_CLIENT -- -f /etc/freenet6/gw6c.conf |