summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/freenet6/ChangeLog5
-rw-r--r--net-misc/freenet6/files/gw6c.rc15
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