From 7585facf05d927eb6df3929ce09ed5e60d905437 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Thu, 7 Feb 2013 13:27:27 +0100 Subject: Imported Upstream version 5.0.2 --- .../etc/apache2/conf.d/testresults-as-text | 1 + testing/hosts/winnetou/etc/apache2/conf/ssl/ca.crt | 22 - .../hosts/winnetou/etc/apache2/conf/ssl/server.crt | 24 - .../hosts/winnetou/etc/apache2/conf/ssl/server.key | 27 - .../etc/apache2/modules.d/00_mod_mime.conf | 61 -- .../etc/apache2/sites-enabled/001-ocsp_vhost | 54 + .../etc/apache2/vhosts.d/01_ocsp_vhost.conf | 52 - testing/hosts/winnetou/etc/conf.d/hostname | 1 - testing/hosts/winnetou/etc/conf.d/net | 10 - testing/hosts/winnetou/etc/conf.d/slapd | 8 - testing/hosts/winnetou/etc/init.d/apache2 | 121 --- testing/hosts/winnetou/etc/init.d/net.eth0 | 1124 -------------------- testing/hosts/winnetou/etc/init.d/slapd | 25 - testing/hosts/winnetou/etc/ldap/ldif.txt | 39 + testing/hosts/winnetou/etc/ldap/slapd.conf | 23 + testing/hosts/winnetou/etc/network/interfaces | 12 + testing/hosts/winnetou/etc/openldap/ldif.txt | 40 - testing/hosts/winnetou/etc/openldap/slapd.conf | 68 -- testing/hosts/winnetou/etc/openssl/generate-crl | 18 +- testing/hosts/winnetou/etc/openssl/index.html | 4 +- testing/hosts/winnetou/etc/openssl/ocsp/ocsp.cgi | 8 +- .../winnetou/etc/openssl/research/ocsp/ocsp.cgi | 8 +- .../hosts/winnetou/etc/openssl/sales/ocsp/ocsp.cgi | 8 +- .../hosts/winnetou/etc/runlevels/default/apache2 | 121 --- .../hosts/winnetou/etc/runlevels/default/net.eth0 | 1124 -------------------- 25 files changed, 153 insertions(+), 2850 deletions(-) create mode 100644 testing/hosts/winnetou/etc/apache2/conf.d/testresults-as-text delete mode 100644 testing/hosts/winnetou/etc/apache2/conf/ssl/ca.crt delete mode 100644 testing/hosts/winnetou/etc/apache2/conf/ssl/server.crt delete mode 100644 testing/hosts/winnetou/etc/apache2/conf/ssl/server.key delete mode 100644 testing/hosts/winnetou/etc/apache2/modules.d/00_mod_mime.conf create mode 100644 testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost delete mode 100644 testing/hosts/winnetou/etc/apache2/vhosts.d/01_ocsp_vhost.conf delete mode 100644 testing/hosts/winnetou/etc/conf.d/hostname delete mode 100644 testing/hosts/winnetou/etc/conf.d/net delete mode 100644 testing/hosts/winnetou/etc/conf.d/slapd delete mode 100755 testing/hosts/winnetou/etc/init.d/apache2 delete mode 100755 testing/hosts/winnetou/etc/init.d/net.eth0 delete mode 100755 testing/hosts/winnetou/etc/init.d/slapd create mode 100644 testing/hosts/winnetou/etc/ldap/ldif.txt create mode 100644 testing/hosts/winnetou/etc/ldap/slapd.conf create mode 100644 testing/hosts/winnetou/etc/network/interfaces delete mode 100644 testing/hosts/winnetou/etc/openldap/ldif.txt delete mode 100644 testing/hosts/winnetou/etc/openldap/slapd.conf delete mode 100755 testing/hosts/winnetou/etc/runlevels/default/apache2 delete mode 100755 testing/hosts/winnetou/etc/runlevels/default/net.eth0 (limited to 'testing/hosts/winnetou') diff --git a/testing/hosts/winnetou/etc/apache2/conf.d/testresults-as-text b/testing/hosts/winnetou/etc/apache2/conf.d/testresults-as-text new file mode 100644 index 000000000..6f5f3011c --- /dev/null +++ b/testing/hosts/winnetou/etc/apache2/conf.d/testresults-as-text @@ -0,0 +1 @@ +AddType text/plain .iptables .log .sql diff --git a/testing/hosts/winnetou/etc/apache2/conf/ssl/ca.crt b/testing/hosts/winnetou/etc/apache2/conf/ssl/ca.crt deleted file mode 100644 index 0de3b268d..000000000 --- a/testing/hosts/winnetou/etc/apache2/conf/ssl/ca.crt +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDtTCCAp2gAwIBAgIBADANBgkqhkiG9w0BAQQFADBFMQswCQYDVQQGEwJDSDEZ -MBcGA1UEChMQTGludXggc3Ry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Zq/nRUfFeTy -0Atebkn8tmUpPSKWaXkmwpVNrjZ1Qu9umAU+dtJyhzL2zmnyhPC4VqpsKCOp7imy -gKZvUIKPm1zyf4T+yjwxwkiX2xVseoM3aKswb1EoZFelHwndU7u0GQ8= ------END CERTIFICATE----- diff --git a/testing/hosts/winnetou/etc/apache2/conf/ssl/server.crt b/testing/hosts/winnetou/etc/apache2/conf/ssl/server.crt deleted file mode 100644 index 956c217d9..000000000 --- a/testing/hosts/winnetou/etc/apache2/conf/ssl/server.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIBDjANBgkqhkiG9w0BAQQFADBFMQswCQYDVQQGEwJDSDEZ -MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS -b290IENBMB4XDTA1MDYwODE5MTcxNFoXDTEwMDYwNzE5MTcxNFowSjELMAkGA1UE -BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xIDAeBgNVBAMTF3dpbm5l -dG91LnN0cm9uZ3N3YW4ub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEAwBkz95BmByWVZaEW8cDbeuGr4C1caGAj4QPmuwaIriK+7XqXuh16Ahe3S5vZ -F56WhUSvMDOIyULckKH84oSa3Jx/SCz0g7X42x8vZuq92tpsjcP/u7BlyqpBUtLa -r14qm5wYw/1nQqMcSG3k9MQOQ+e9KgaGqpidxWM/8T4M/41AaFRBK2gQGBUULo26 -sjoq3af7Z2jYmWkP/kzj1CHLy9Mgt+UvhKeA+ag5cZnyOG596cqVjlKyqG7vdggk -wW2n+/KDpHNOndYfT7GMFeGXUNzJPkCImWlttic7ssi0mjP3q3MuOP3FNHIRMd2H -AcNcqT0bgdJHqnNzGv8C0Ei9XQIDAQABo4IBCTCCAQUwCQYDVR0TBAIwADALBgNV -HQ8EBAMCA6gwHQYDVR0OBBYEFEMS0mbhrA4zDvmfKf4MntUNxkH4MG0GA1UdIwRm -MGSAFF2n3XAGUTJ+57Zts7Xl4GDqLk3voUmkRzBFMQswCQYDVQQGEwJDSDEZMBcG -A1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBSb290 -IENBggEAMCIGA1UdEQQbMBmCF3dpbm5ldG91LnN0cm9uZ3N3YW4ub3JnMDkGA1Ud -HwQyMDAwLqAsoCqGKGh0dHA6Ly9jcmwuc3Ryb25nc3dhbi5vcmcvc3Ryb25nc3dh -bi5jcmwwDQYJKoZIhvcNAQEEBQADggEBACO4+j1Mwt/lbkopeSJst46uFh7OtegG -6IWNE30i3l3FIn9slSwAOMtmZR0hAF8sExvk61EPlzCR/d9trSJ5+gyjPkeF/enw -p61rxPMT13Grzomi9gYlk6Q/0zLmE9uYWEY69Q0bEIUcfdZfwB+F7kesa946JNMc -yHfVEhKtvzmns9ueG0S/8E+6MPDeJv+JHQ++SdWSvOVg6JNxXDGusnim2fjM2Aln -JmqA6iU4IaPl9DUCuXlLOVv/YhwhviNEbF94upyHq8xjOZdzPbKroHXg/2yvalAw -4aXc/ZsnFxqsq3i6a2Fj1Y4J7gYsNO/HwA0xvKz3loOTqHaJqO/qeow= ------END CERTIFICATE----- diff --git a/testing/hosts/winnetou/etc/apache2/conf/ssl/server.key b/testing/hosts/winnetou/etc/apache2/conf/ssl/server.key deleted file mode 100644 index 727027188..000000000 --- a/testing/hosts/winnetou/etc/apache2/conf/ssl/server.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAwBkz95BmByWVZaEW8cDbeuGr4C1caGAj4QPmuwaIriK+7XqX -uh16Ahe3S5vZF56WhUSvMDOIyULckKH84oSa3Jx/SCz0g7X42x8vZuq92tpsjcP/ -u7BlyqpBUtLar14qm5wYw/1nQqMcSG3k9MQOQ+e9KgaGqpidxWM/8T4M/41AaFRB -K2gQGBUULo26sjoq3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QCoFhTNH/+e/YawjNFQJFSn4WUnMn0Pmhc7xfLl -T/NPkqtx6dN3d7ZmCQrMow33yJOqOje5tFXzgc0KtNE4S8Uj3T4XA5SlQGVFyjAa -/85JRM2naA8RGVSpCCKuBeoNilnb8zL2SOvjyboN8oAyNuDzk2vh6ihjFsoASHkP -4XwLXQKBgQC0k6rzt/plIwEiP56XXOqwOxJj6kuE/hx1zGIiGT6lWiOsih20Ym2T -kYegVFvuDIWmSIAxGONWyee1lfnJbEuaHRixWQTnHUpqrU0FSnZTubnR3q/faZat -hrvLDdpa0ydAKoMEn3qUPSrh3CdBfi3KTQAQn2Mlk7bGHh9ICWi3vA== ------END RSA PRIVATE KEY----- diff --git a/testing/hosts/winnetou/etc/apache2/modules.d/00_mod_mime.conf b/testing/hosts/winnetou/etc/apache2/modules.d/00_mod_mime.conf deleted file mode 100644 index 72b7e0ea4..000000000 --- a/testing/hosts/winnetou/etc/apache2/modules.d/00_mod_mime.conf +++ /dev/null @@ -1,61 +0,0 @@ -# DefaultType: the default MIME type the server will use for a document -# if it cannot otherwise determine one, such as from filename extensions. -# If your server contains mostly text or HTML documents, "text/plain" is -# a good value. If most of your content is binary, such as applications -# or images, you may want to use "application/octet-stream" instead to -# keep browsers from trying to display binary files as though they are -# text. -DefaultType text/plain - - -# TypesConfig points to the file containing the list of mappings from -# filename extension to MIME-type. -TypesConfig /etc/mime.types - -# AddType allows you to add to or override the MIME configuration -# file specified in TypesConfig for specific file types. -#AddType application/x-gzip .tgz - -# AddEncoding allows you to have certain browsers uncompress -# information on the fly. Note: Not all browsers support this. -#AddEncoding x-compress .Z -#AddEncoding x-gzip .gz .tgz - -# If the AddEncoding directives above are commented-out, then you -# probably should define those extensions to indicate media types: -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz - -# AddHandler allows you to map certain file extensions to "handlers": -# actions unrelated to filetype. These can be either built into the server -# or added with the Action directive (see below) - -# To use CGI scripts outside of ScriptAliased directories: -# (You will also need to add "ExecCGI" to the "Options" directive.) -AddHandler cgi-script .cgi - -# For files that include their own HTTP headers: -#AddHandler send-as-is asis - -# For server-parsed imagemap files: -#AddHandler imap-file map - -# For type maps (negotiated resources): -AddHandler type-map var - -# Filters allow you to process content before it is sent to the client. -# -# To parse .shtml files for server-side includes (SSI): -# (You will also need to add "Includes" to the "Options" directive.) -#AddType text/html .shtml -#AddOutputFilter INCLUDES .shtml - - - -# The mod_mime_magic module allows the server to use various hints from the -# contents of the file itself to determine its type. The MIMEMagicFile -# directive tells the module where the hint definitions are located. -MIMEMagicFile /etc/apache2/magic - - -# vim: ts=4 filetype=apache diff --git a/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost b/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost new file mode 100644 index 000000000..b76080e37 --- /dev/null +++ b/testing/hosts/winnetou/etc/apache2/sites-enabled/001-ocsp_vhost @@ -0,0 +1,54 @@ +# OCSP Server + +Listen 8880 + +AddHandler cgi-script .cgi + + + ServerAdmin root@strongswan.org + DocumentRoot /etc/openssl/ocsp + ServerName ocsp.strongswan.org + ServerAlias 192.168.0.150 + DirectoryIndex ocsp.cgi + + Options +ExecCGI + Order allow,deny + Allow from all + + ErrorLog /var/log/apache2/ocsp/error_log + CustomLog /var/log/apache2/ocsp/access_log combined + + +Listen 8881 + + + ServerAdmin root@research.strongswan.org + DocumentRoot /etc/openssl/research/ocsp + ServerName ocsp.research.strongswan.org + ServerAlias ocsp.strongswan.org 192.168.0.150 + DirectoryIndex ocsp.cgi + + Options +ExecCGI + Order allow,deny + Allow from all + + ErrorLog /var/log/apache2/ocsp/error_log + CustomLog /var/log/apache2/ocsp/access_log combined + + +Listen 8882 + + + ServerAdmin root@sales.strongswan.org + DocumentRoot /etc/openssl/sales/ocsp + ServerName ocsp.sales.strongswan.org + ServerAlias ocsp.strongswan.org 192.168.0.150 + DirectoryIndex ocsp.cgi + + Options +ExecCGI + Order allow,deny + Allow from all + + ErrorLog /var/log/apache2/ocsp/error_log + CustomLog /var/log/apache2/ocsp/access_log combined + diff --git a/testing/hosts/winnetou/etc/apache2/vhosts.d/01_ocsp_vhost.conf b/testing/hosts/winnetou/etc/apache2/vhosts.d/01_ocsp_vhost.conf deleted file mode 100644 index 9a32412db..000000000 --- a/testing/hosts/winnetou/etc/apache2/vhosts.d/01_ocsp_vhost.conf +++ /dev/null @@ -1,52 +0,0 @@ -# OCSP Server - -Listen 8880 - - - ServerAdmin root@strongswan.org - DocumentRoot /etc/openssl/ocsp - ServerName ocsp.strongswan.org - ServerAlias 192.168.0.150 - DirectoryIndex ocsp.cgi - - Options +ExecCGI - Order allow,deny - Allow from all - - ErrorLog /var/log/apache2/ocsp/error_log - CustomLog /var/log/apache2/ocsp/access_log combined - - -Listen 8881 - - - ServerAdmin root@research.strongswan.org - DocumentRoot /etc/openssl/research/ocsp - ServerName ocsp.research.strongswan.org - ServerAlias ocsp.strongswan.org 192.168.0.150 - DirectoryIndex ocsp.cgi - - Options +ExecCGI - Order allow,deny - Allow from all - - ErrorLog /var/log/apache2/ocsp/error_log - CustomLog /var/log/apache2/ocsp/access_log combined - - -Listen 8882 - - - ServerAdmin root@sales.strongswan.org - DocumentRoot /etc/openssl/sales/ocsp - ServerName ocsp.sales.strongswan.org - ServerAlias ocsp.strongswan.org 192.168.0.150 - DirectoryIndex ocsp.cgi - - Options +ExecCGI - Order allow,deny - Allow from all - - ErrorLog /var/log/apache2/ocsp/error_log - CustomLog /var/log/apache2/ocsp/access_log combined - diff --git a/testing/hosts/winnetou/etc/conf.d/hostname b/testing/hosts/winnetou/etc/conf.d/hostname deleted file mode 100644 index 1bfa5acbd..000000000 --- a/testing/hosts/winnetou/etc/conf.d/hostname +++ /dev/null @@ -1 +0,0 @@ -HOSTNAME=winnetou diff --git a/testing/hosts/winnetou/etc/conf.d/net b/testing/hosts/winnetou/etc/conf.d/net deleted file mode 100644 index 7fbc37014..000000000 --- a/testing/hosts/winnetou/etc/conf.d/net +++ /dev/null @@ -1,10 +0,0 @@ -# /etc/conf.d/net: - -# This is basically the ifconfig argument without the ifconfig $iface -# -config_eth0=( "PH_IP_WINNETOU broadcast 192.168.0.255 netmask 255.255.255.0" - "PH_IP6_WINNETOU/16" ) - -# For setting the default gateway -# -routes_eth0=( "default via 192.168.0.254" ) diff --git a/testing/hosts/winnetou/etc/conf.d/slapd b/testing/hosts/winnetou/etc/conf.d/slapd deleted file mode 100644 index 8d9ac4787..000000000 --- a/testing/hosts/winnetou/etc/conf.d/slapd +++ /dev/null @@ -1,8 +0,0 @@ -# conf.d file for the openldap-2.1 series -# -# To enable both the standard unciphered server and the ssl encrypted -# one uncomment this line or set any other server starting options -# you may desire. -# -# OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'" -OPTS="-4" diff --git a/testing/hosts/winnetou/etc/init.d/apache2 b/testing/hosts/winnetou/etc/init.d/apache2 deleted file mode 100755 index 5f72d3090..000000000 --- a/testing/hosts/winnetou/etc/init.d/apache2 +++ /dev/null @@ -1,121 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -opts="configtest fullstatus graceful gracefulstop modules reload" - -depend() { - need net - use mysql dns logger netmount postgresql - after sshd -} - -configtest() { - ebegin "Checking Apache Configuration" - checkconfig - eend $? -} - -checkconfig() { - SERVERROOT="${SERVERROOT:-/usr/lib/apache2}" - if [ ! -d ${SERVERROOT} ]; then - eerror "SERVERROOT does not exist: ${SERVERROOT}" - return 1 - fi - - CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" - [ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}" - if [ ! -r "${CONFIGFILE}" ]; then - eerror "Unable to read configuration file: ${CONFIGFILE}" - return 1 - fi - - APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" - APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" - [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}" - - APACHE2="/usr/sbin/apache2" - - ${APACHE2} ${APACHE2_OPTS} -t 1>/dev/null 2>&1 - ret=$? - if [ $ret -ne 0 ]; then - eerror "Apache2 has detected a syntax error in your configuration files:" - ${APACHE2} ${APACHE2_OPTS} -t - fi - - return $ret -} - -start() { - checkconfig || return 1 - ebegin "Starting apache2" - [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache - - start-stop-daemon --start --exec ${APACHE2} -- ${APACHE2_OPTS} -k start - eend $? -} - -stop() { - checkconfig || return 1 - ebegin "Stopping apache2" - start-stop-daemon --stop --retry -TERM/5/-KILL/5 --exec ${APACHE2} --pidfile /var/run/apache2.pid - eend $? -} - -reload() { - RELOAD_TYPE="${RELOAD_TYPE:-graceful}" - - checkconfig || return 1 - if [ "${RELOAD_TYPE}" = "restart" ]; then - ebegin "Restarting apache2" - start-stop-daemon --stop --oknodo --signal HUP --exec ${APACHE2} --pidfile /var/run/apache2.pid - eend $? - elif [ "${RELOAD_TYPE}" = "graceful" ]; then - ebegin "Gracefully restarting apache2" - start-stop-daemon --stop --oknodo --signal USR1 --exec ${APACHE2} --pidfile /var/run/apache2.pid - eend $? - else - eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/apache2" - fi -} - -graceful() { - checkconfig || return 1 - ebegin "Gracefully restarting apache2" - start-stop-daemon --stop --signal USR1 --exec ${APACHE2} --pidfile /var/run/apache2.pid - eend $? -} - -gracefulstop() { - checkconfig || return 1 - - # zap! - if service_started "${myservice}"; then - mark_service_stopped "${myservice}" - fi - - ebegin "Gracefully stopping apache2" - # 28 is SIGWINCH - start-stop-daemon --stop --signal 28 --exec ${APACHE2} --pidfile /var/run/apache2.pid - eend $? -} - -modules() { - checkconfig || return 1 - - ${APACHE2} ${APACHE2_OPTS} -M 2>&1 -} - -status() { - LYNX="${LYNX:-lynx -dump}" - STATUSURL="${STATUSURL:-http://localhost/server-status}" - - ${LYNX} ${STATUSURL} | awk ' /process$/ { print; exit } { print } ' -} - -fullstatus() { - LYNX="${LYNX:-lynx -dump}" - STATUSURL="${STATUSURL:-http://localhost/server-status}" - - ${LYNX} ${STATUSURL} -} diff --git a/testing/hosts/winnetou/etc/init.d/net.eth0 b/testing/hosts/winnetou/etc/init.d/net.eth0 deleted file mode 100755 index 92b3851cf..000000000 --- a/testing/hosts/winnetou/etc/init.d/net.eth0 +++ /dev/null @@ -1,1124 +0,0 @@ -#!/sbin/runscript -# Copyright (c) 2004-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Contributed by Roy Marples (uberlord@gentoo.org) -# Many thanks to Aron Griffis (agriffis@gentoo.org) -# for help, ideas and patches - -#NB: Config is in /etc/conf.d/net - -# For pcmcia users. note that pcmcia must be added to the same -# runlevel as the net.* script that needs it. -depend() { - need localmount - after bootmisc hostname - use isapnp isdn pcmcia usb wlan - - # Load any custom depend functions for the given interface - # For example, br0 may need eth0 and eth1 - local iface="${SVCNAME#*.}" - [[ $(type -t "depend_${iface}") == "function" ]] && depend_${iface} - - if [[ ${iface} != "lo" && ${iface} != "lo0" ]] ; then - after net.lo net.lo0 - - # Support new style RC_NEED and RC_USE in one net file - local x="RC_NEED_${iface}" - [[ -n ${!x} ]] && need ${!x} - x="RC_USE_${iface}" - [[ -n ${!x} ]] && use ${!x} - fi - - return 0 -} - -# Define where our modules are -MODULES_DIR="${svclib}/net" - -# Make some wrappers to fudge after/before/need/use depend flags. -# These are callbacks so MODULE will be set. -after() { - eval "${MODULE}_after() { echo \"$*\"; }" -} -before() { - eval "${MODULE}_before() { echo \"$*\"; }" -} -need() { - eval "${MODULE}_need() { echo \"$*\"; }" -} -installed() { - # We deliberately misspell this as _installed will probably be used - # at some point - eval "${MODULE}_instlled() { echo \"$*\"; }" -} -provide() { - eval "${MODULE}_provide() { echo \"$*\"; }" -} -functions() { - eval "${MODULE}_functions() { echo \"$*\"; }" -} -variables() { - eval "${MODULE}_variables() { echo \"$*\"; }" -} - -is_loopback() { - [[ $1 == "lo" || $1 == "lo0" ]] -} - -# char* interface_device(char *iface) -# -# Gets the base device of the interface -# Can handle eth0:1 and eth0.1 -# Which returns eth0 in this case -interface_device() { - local dev="${1%%.*}" - [[ ${dev} == "$1" ]] && dev="${1%%:*}" - echo "${dev}" -} - -# char* interface_type(char* iface) -# -# Returns the base type of the interface -# eth, ippp, etc -interface_type() { - echo "${1%%[0-9]*}" -} - -# int calculate_metric(char *interface, int base) -# -# Calculates the best metric for the interface -# We use this when we add routes so we can prefer interfaces over each other -calculate_metric() { - local iface="$1" metric="$2" - - # Have we already got a metric? - local m=$(awk '$1=="'${iface}'" && $2=="00000000" { print $7 }' \ - /proc/net/route) - if [[ -n ${m} ]] ; then - echo "${m}" - return 0 - fi - - local i= dest= gw= flags= ref= u= m= mtu= metrics= - while read i dest gw flags ref u m mtu ; do - # Ignore lo - is_loopback "${i}" && continue - # We work out metrics from default routes only - [[ ${dest} != "00000000" || ${gw} == "00000000" ]] && continue - metrics="${metrics}\n${m}" - done < /proc/net/route - - # Now, sort our metrics - metrics=$(echo -e "${metrics}" | sort -n) - - # Now, find the lowest we can use - local gotbase=false - for m in ${metrics} ; do - [[ ${m} -lt ${metric} ]] && continue - [[ ${m} == ${metric} ]] && ((metric++)) - [[ ${m} -gt ${metric} ]] && break - done - - echo "${metric}" -} - -# int netmask2cidr(char *netmask) -# -# Returns the CIDR of a given netmask -netmask2cidr() { - local binary= i= bin= - - for i in ${1//./ }; do - bin="" - while [[ ${i} != "0" ]] ; do - bin=$[${i}%2]${bin} - (( i=i>>1 )) - done - binary="${binary}${bin}" - done - binary="${binary%%0*}" - echo "${#binary}" -} - - -# bool is_function(char* name) -# -# Returns 0 if the given name is a shell function, otherwise 1 -is_function() { - [[ -z $1 ]] && return 1 - [[ $(type -t "$1") == "function" ]] -} - -# void function_wrap(char* source, char* target) -# -# wraps function calls - for example function_wrap(this, that) -# maps function names this_* to that_* -function_wrap() { - local i= - - is_function "${2}_depend" && return - - for i in $(typeset -f | grep -o '^'"${1}"'_[^ ]*'); do - eval "${2}${i#${1}}() { ${i} \"\$@\"; }" - done -} - -# char[] * expand_parameters(char *cmd) -# -# Returns an array after expanding parameters. For example -# "192.168.{1..3}.{1..3}/24 brd +" -# will return -# "192.168.1.1/24 brd +" -# "192.168.1.2/24 brd +" -# "192.168.1.3/24 brd +" -# "192.168.2.1/24 brd +" -# "192.168.2.2/24 brd +" -# "192.168.2.3/24 brd +" -# "192.168.3.1/24 brd +" -# "192.168.3.2/24 brd +" -# "192.168.3.3/24 brd +" -expand_parameters() { - local x=$(eval echo ${@// /_}) - local -a a=( ${x} ) - - a=( "${a[@]/#/\"}" ) - a=( "${a[@]/%/\"}" ) - echo "${a[*]//_/ }" -} - -# void configure_variables(char *interface, char *option1, [char *option2]) -# -# Maps configuration options from _