Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 295449 Details for
Bug 394281
sys-apps/openrc Use sys-apps/iproute2 to create tap/tun interfaces
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch net/tuntap.sh to use iproute2 - round 2
openrc-tuntap.patch (text/plain), 1.87 KB, created by
Christopher Byrne
on 2011-12-11 10:06:47 UTC
(
hide
)
Description:
Patch net/tuntap.sh to use iproute2 - round 2
Filename:
MIME Type:
Creator:
Christopher Byrne
Created:
2011-12-11 10:06:47 UTC
Size:
1.87 KB
patch
obsolete
>--- /lib/rc/net/tuntap.sh.old 2011-12-10 17:52:15.989600925 -0600 >+++ /lib/rc/net/tuntap.sh 2011-12-11 03:57:53.501072195 -0600 >@@ -44,28 +44,35 @@ > # Set the base metric to 1000 > metric=1000 > >- local o_opts= t_opts= do_openvpn=false do_tunctl=false >+ local i_opts= o_opts= t_opts= do_iproute2=false do_openvpn=false do_tunctl=false >+ eval i_opts=\$iproute2_${IFVAR} > eval o_opts=\$openvpn_${IFVAR} > eval t_opts=\$tunctl_${IFVAR} > >- if [ -n "${o_opts}" ] && type openvpn >/dev/null 2>&1; then >+ if [ -n "${i_opts}" ] && type ip >/dev/null 2>&1; then >+ do_iproute2=true >+ elif [ -n "${o_opts}" ] && type openvpn >/dev/null 2>&1; then > do_openvpn=true > elif [ -n "${t_opts}" ] && type tunctl >/dev/null 2>&1; then > do_tunctl=true >+ elif type ip >/dev/null 2>&1; then >+ do_iproute2=true > elif type openvpn >/dev/null 2>&1; then > do_openvpn=true > elif type tunctl >/dev/null 2>&1; then > do_tunctl=true > fi > >- if ${do_openvpn}; then >+ if ${do_iproute2}; then >+ ip tuntap add dev "${IFACE}" mode "${tuntap}" ${i_opts} >+ elif ${do_openvpn}; then > openvpn --mktun --dev-type "${tuntap}" --dev "${IFACE}" \ > ${o_opts} >/dev/null > elif ${do_tunctl}; then > tunctl ${t_opts} -t "${IFACE}" >/dev/null > else >- eerror "Neither openvpn nor tunctl has been found, please install" >- eerror "either \"openvpn\" or \"usermode-utilities\"." >+ eerror "Neither iproute2, openvpn nor tunctl has been found, please install" >+ eerror "either \"iproute2\" \"openvpn\" or \"usermode-utilities\"." > fi > eend $? && _up && service_set_value tuntap "${tuntap}" > } >@@ -75,7 +82,9 @@ > _is_tuntap || return 0 > > ebegin "Destroying Tun/Tap interface ${IFACE}" >- if type tunctl >/dev/null 2>&1; then >+ if type iproute2 > /dev/null 2>&1; then >+ _ip tuntap del dev ${IFACE} mode ${service_get_value tuntap} >+ elif type tunctl >/dev/null 2>&1; then > tunctl -d "${IFACE}" >/dev/null > else > openvpn --rmtun \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 394281
:
295427
| 295449 |
295575