Author: Antonio Borneo
Date: Sun Mar 10 16:01:25 2013
New Revision: 524
Log:
handle creating/destroying the tun device on OpenBSD
Signed-off-by: Stuart Henderson <sthen@openbsd.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Modified:
branches/vpnc-nortel/vpnc-script
trunk/vpnc-script
Modified: branches/vpnc-nortel/vpnc-script
==============================================================================
--- branches/vpnc-nortel/vpnc-script (original)
+++ branches/vpnc-nortel/vpnc-script Sun Mar 10 16:01:25 2013
@@ -198,7 +198,7 @@
destroy_tun_device() {
case "$OS" in
- NetBSD|FreeBSD) # and probably others...
+ NetBSD|FreeBSD|OpenBSD) # and probably others...
ifconfig "$TUNDEV" destroy
;;
esac
@@ -317,7 +317,7 @@
del_network_route() {
case "$OS" in
- Linux|NetBSD|Darwin|SunOS) # and probably others...
+ Linux|NetBSD|OpenBSD|Darwin|SunOS) # and probably others...
# routes are deleted automatically on device shutdown
return
;;
@@ -603,6 +603,9 @@
elif [ "$OS" = "NetBSD" ]; then
:
elif [ "$OS" = "OpenBSD" ]; then
+ if ! ifconfig $TUNDEV > /dev/null; then
+ ifconfig $TUNDEV create
+ fi
:
elif [ "$OS" = "SunOS" ]; then
:
Modified: trunk/vpnc-script
==============================================================================
--- trunk/vpnc-script (original)
+++ trunk/vpnc-script Sun Mar 10 16:01:25 2013
@@ -198,7 +198,7 @@
destroy_tun_device() {
case "$OS" in
- NetBSD|FreeBSD) # and probably others...
+ NetBSD|FreeBSD|OpenBSD) # and probably others...
ifconfig "$TUNDEV" destroy
;;
esac
@@ -317,7 +317,7 @@
del_network_route() {
case "$OS" in
- Linux|NetBSD|Darwin|SunOS) # and probably others...
+ Linux|NetBSD|OpenBSD|Darwin|SunOS) # and probably others...
# routes are deleted automatically on device shutdown
return
;;
@@ -603,6 +603,9 @@
elif [ "$OS" = "NetBSD" ]; then
:
elif [ "$OS" = "OpenBSD" ]; then
+ if ! ifconfig $TUNDEV > /dev/null; then
+ ifconfig $TUNDEV create
+ fi
:
elif [ "$OS" = "SunOS" ]; then
:
_______________________________________________
vpnc-devel mailing list
vpnc-devel@unix-ag.uni-kl.de
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/
Date: Sun Mar 10 16:01:25 2013
New Revision: 524
Log:
handle creating/destroying the tun device on OpenBSD
Signed-off-by: Stuart Henderson <sthen@openbsd.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Modified:
branches/vpnc-nortel/vpnc-script
trunk/vpnc-script
Modified: branches/vpnc-nortel/vpnc-script
==============================================================================
--- branches/vpnc-nortel/vpnc-script (original)
+++ branches/vpnc-nortel/vpnc-script Sun Mar 10 16:01:25 2013
@@ -198,7 +198,7 @@
destroy_tun_device() {
case "$OS" in
- NetBSD|FreeBSD) # and probably others...
+ NetBSD|FreeBSD|OpenBSD) # and probably others...
ifconfig "$TUNDEV" destroy
;;
esac
@@ -317,7 +317,7 @@
del_network_route() {
case "$OS" in
- Linux|NetBSD|Darwin|SunOS) # and probably others...
+ Linux|NetBSD|OpenBSD|Darwin|SunOS) # and probably others...
# routes are deleted automatically on device shutdown
return
;;
@@ -603,6 +603,9 @@
elif [ "$OS" = "NetBSD" ]; then
:
elif [ "$OS" = "OpenBSD" ]; then
+ if ! ifconfig $TUNDEV > /dev/null; then
+ ifconfig $TUNDEV create
+ fi
:
elif [ "$OS" = "SunOS" ]; then
:
Modified: trunk/vpnc-script
==============================================================================
--- trunk/vpnc-script (original)
+++ trunk/vpnc-script Sun Mar 10 16:01:25 2013
@@ -198,7 +198,7 @@
destroy_tun_device() {
case "$OS" in
- NetBSD|FreeBSD) # and probably others...
+ NetBSD|FreeBSD|OpenBSD) # and probably others...
ifconfig "$TUNDEV" destroy
;;
esac
@@ -317,7 +317,7 @@
del_network_route() {
case "$OS" in
- Linux|NetBSD|Darwin|SunOS) # and probably others...
+ Linux|NetBSD|OpenBSD|Darwin|SunOS) # and probably others...
# routes are deleted automatically on device shutdown
return
;;
@@ -603,6 +603,9 @@
elif [ "$OS" = "NetBSD" ]; then
:
elif [ "$OS" = "OpenBSD" ]; then
+ if ! ifconfig $TUNDEV > /dev/null; then
+ ifconfig $TUNDEV create
+ fi
:
elif [ "$OS" = "SunOS" ]; then
:
_______________________________________________
vpnc-devel mailing list
vpnc-devel@unix-ag.uni-kl.de
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/