OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
3.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../etcnet/etcnet-0.8.5-tap-support.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Submitted By: Christian Wiese <morfoh at opensde dot org>
  17. Date: 2007-03-01
  18. Initial Package Version: 0.8.5
  19. Upstream Status: submitted
  20. Origin: Christian Wiese <morfoh at opensde dot org>
  21. http://trac.opensde.org/browser/package/trunk/network/etcnet/
  22. Description: This patch adds tap interface support to etcnet using the tunctl
  23. command.
  24. diff -ruN etcnet-0.8.5/etc/net/options.d/00-default etcnet-0.8.5-tap/etc/net/options.d/00-default
  25. --- etcnet-0.8.5/etc/net/options.d/00-default 2006-09-23 20:45:27.000000000 +0300
  26. +++ etcnet-0.8.5-tap/etc/net/options.d/00-default 2007-03-01 21:54:10.000000000 +0200
  27. @@ -61,7 +61,7 @@
  28. # 'broadcast +' to each IPv4 address line (see iproute2 manual).
  29. AUTO_BROADCAST=off
  30. -IFGROUP[0]='lo dummy'
  31. +IFGROUP[0]='lo dummy tap'
  32. IFGROUP[1]='eth plip usb dvb bnep'
  33. IFGROUP[2]='vlan bond bri teql'
  34. IFGROUP[3]='iptun ipsectun'
  35. diff -ruN etcnet-0.8.5/etc/net/scripts/create-tap etcnet-0.8.5-tap/etc/net/scripts/create-tap
  36. --- etcnet-0.8.5/etc/net/scripts/create-tap 1970-01-01 02:00:00.000000000 +0200
  37. +++ etcnet-0.8.5-tap/etc/net/scripts/create-tap 2007-03-01 17:57:52.000000000 +0200
  38. @@ -0,0 +1,16 @@
  39. +#!/bin/bash
  40. +
  41. +pickup_defaults
  42. +pickup_options
  43. +
  44. +$MODPROBE tun || {
  45. + print_error "tun kernel module not found"
  46. + exit 2
  47. +}
  48. +
  49. +[ -x "${TUNCTL:=$DEFAULT_TUNCTL}" ] || {
  50. + print_error "$TUNCTL does not exist or is not executable. Try installing tunctctl package on your system."
  51. + exit 1
  52. +}
  53. +
  54. +$TUNCTL -t $NAME
  55. diff -ruN etcnet-0.8.5/etc/net/scripts/destroy-tap etcnet-0.8.5-tap/etc/net/scripts/destroy-tap
  56. --- etcnet-0.8.5/etc/net/scripts/destroy-tap 1970-01-01 02:00:00.000000000 +0200
  57. +++ etcnet-0.8.5-tap/etc/net/scripts/destroy-tap 2007-03-01 17:57:52.000000000 +0200
  58. @@ -0,0 +1,12 @@
  59. +#!/bin/bash
  60. +
  61. +pickup_defaults
  62. +pickup_options
  63. +
  64. +[ -x "${TUNCTL:=$DEFAULT_TUNCTL}" ] || {
  65. + print_error "$TUNCTL does not exist or is not executable. Try installing the tunctl package on your system."
  66. + exit 1
  67. +}
  68. +
  69. +$TUNCTL -d $NAME
  70. +try_rmmod tun
  71. diff -ruN etcnet-0.8.5/etc/net/scripts/functions etcnet-0.8.5-tap/etc/net/scripts/functions
  72. --- etcnet-0.8.5/etc/net/scripts/functions 2007-01-28 14:27:19.000000000 +0200
  73. +++ etcnet-0.8.5-tap/etc/net/scripts/functions 2007-03-01 17:59:48.000000000 +0200
  74. @@ -41,6 +41,7 @@
  75. DEFAULT_SZAP_ARGS='-n 1 -x'
  76. DEFAULT_DVBNET=/usr/bin/dvbnet
  77. DEFAULT_PAND=/usr/bin/pand
  78. +DEFAULT_TUNCTL=/usr/sbin/tunctl
  79. trim()
  80. {
  81. @@ -487,3 +488,4 @@
  82. declare -rx DEFAULT_PPPINITCHAT DEFAULT_PPPCONNECTCHAT DEFAULT_PPPDISCONNECTCHAT
  83. declare -rx DEFAULT_CHATOPTIONS DEFAULT_PPPOE DEFAULT_PPPOEOPTIONS DEFAULT_PPTP
  84. declare -rx DEFAULT_SZAP DEFAULT_SZAP_ARGS DEFAULT_DVBNET DEFAULT_PAND
  85. +declare -rx DEFAULT_TUNCTL