From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RaM0d-00084D-7e for garchives@archives.gentoo.org; Tue, 13 Dec 2011 06:38:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA4FF21C088; Tue, 13 Dec 2011 06:38:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 744A221C088 for ; Tue, 13 Dec 2011 06:38:31 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ECC2B1B4012 for ; Tue, 13 Dec 2011 06:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 159BA8004A for ; Tue, 13 Dec 2011 06:38:30 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/tuntap.sh X-VCS-Directories: net/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: ce9994f7caa3a82575b61b944b69b518b3508710 Date: Tue, 13 Dec 2011 06:38:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 8d4d2de1-eb2f-4e78-9311-2898691e1f7f X-Archives-Hash: ee64a627325437c0156cd938f14cd7c3 commit: ce9994f7caa3a82575b61b944b69b518b3508710 Author: William Hubbs gentoo org> AuthorDate: Tue Dec 13 06:25:58 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Dec 13 06:25:58 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3Dce9994f7 net/tuntap: fix return code when tools can't be found This module should return failure if iproute2, openvpn or tunctl cannot be found. Before it was returning success; this fixes the issue. --- net/tuntap.sh | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/net/tuntap.sh b/net/tuntap.sh index 45a80fe..679b097 100644 --- a/net/tuntap.sh +++ b/net/tuntap.sh @@ -16,6 +16,7 @@ _is_tuntap() tuntap_pre_start() { local tuntap=3D + local rc=3D eval tuntap=3D\$tuntap_${IFVAR} =20 [ -z "${tuntap}" ] && return 0 @@ -66,16 +67,20 @@ tuntap_pre_start() =20 if ${do_iproute2}; then ip tuntap add dev "${IFACE}" mode "${tuntap}" ${i_opts} + rc=3D$? elif ${do_openvpn}; then openvpn --mktun --dev-type "${tuntap}" --dev "${IFACE}" \ ${o_opts} >/dev/null + rc=3D$? elif ${do_tunctl}; then tunctl ${t_opts} -t "${IFACE}" >/dev/null + rc=3D$? else eerror "Neither iproute2, openvpn nor tunctl has been found, please in= stall" eerror "either \"iproute2\" \"openvpn\" or \"usermode-utilities\"." + rc=3D1 fi - eend $? && _up && service_set_value tuntap "${tuntap}" + eend $rc && _up && service_set_value tuntap "${tuntap}" } =20 tuntap_post_stop()