diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/etcnet | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core/etcnet')
-rw-r--r-- | abs/core/etcnet/10-defaults | 6 | ||||
-rwxr-xr-x | abs/core/etcnet/PKGBUILD | 39 | ||||
-rwxr-xr-x | abs/core/etcnet/adddhcp.patch | 51 | ||||
-rwxr-xr-x | abs/core/etcnet/etcnet.install | 42 | ||||
-rw-r--r-- | abs/core/etcnet/functions.patch | 12 | ||||
-rwxr-xr-x | abs/core/etcnet/ipv4address | 1 | ||||
-rwxr-xr-x | abs/core/etcnet/ipv4route | 1 | ||||
-rw-r--r-- | abs/core/etcnet/network | 6 | ||||
-rwxr-xr-x | abs/core/etcnet/options | 62 |
9 files changed, 220 insertions, 0 deletions
diff --git a/abs/core/etcnet/10-defaults b/abs/core/etcnet/10-defaults new file mode 100644 index 0000000..42a7879 --- /dev/null +++ b/abs/core/etcnet/10-defaults @@ -0,0 +1,6 @@ +DHCP_CLIENT=/sbin/dhcpcd +IP=/usr/sbin/ip +TC=/usr/sbin/tc +LSMOD=/bin/lsmod +IFGROUP[1]='eth wlan plip usb dvb bnep tuntap' + diff --git a/abs/core/etcnet/PKGBUILD b/abs/core/etcnet/PKGBUILD new file mode 100755 index 0000000..798213e --- /dev/null +++ b/abs/core/etcnet/PKGBUILD @@ -0,0 +1,39 @@ +pkgname=etcnet +pkgver=0.9.7 +pkgrel=2 +pkgdesc="/etc/net network configuration subsystem" +url="http://etcnet.org/" +depends=('bash' 'grep' 'sed' 'iproute' 'wireless_tools' 'iptables' 'dhcpcd') +arch=i686 +install=etcnet.install +source=(http://etcnet.org/files/$pkgname-$pkgver.tar.gz 10-defaults network functions.patch options ipv4route ipv4address ) + +build() { + cd $startdir/src/$pkgname-$pkgver + mkdir -p $startdir/pkg/var/lib/etcnet + mkdir -p $startdir/pkg/etc/sysconfig + + + + + + #cp $startdir/src/functions.patch ./etc/net + cd etc/net + patch -p0 < $startdir/src/functions.patch + + + install -D -m 644 $startdir/src/10-defaults $startdir/pkg/etc/net/options.d/10-defaults + install -D -m 644 $startdir/src/network $startdir/pkg/etc/sysconfig/network +# install -D -m 644 ../options $startdir/pkg/etc/net/ifaces/default/options + +#setup default for eth0 + mkdir -p $startdir/pkg/etc/net/ifaces/eth0 + cp $startdir/src/options $startdir/pkg/etc/net/ifaces/eth0/options + cp $startdir/src/ipv4route $startdir/pkg/etc/net/ifaces/eth0/ipv4route + cp $startdir/src/ipv4address $startdir/pkg/etc/net/ifaces/eth0/ipv4address + + cd $startdir/src/$pkgname-$pkgver + rm -Rf etc/sysconfig etc/net/{README.ALT,TODO,ChangeLog,ifaces/unknown} + cp -Rf etc $startdir/pkg + +} diff --git a/abs/core/etcnet/adddhcp.patch b/abs/core/etcnet/adddhcp.patch new file mode 100755 index 0000000..ee7b782 --- /dev/null +++ b/abs/core/etcnet/adddhcp.patch @@ -0,0 +1,51 @@ +diff -ruN etc/net/ifaces/default/options /etc/net/ifaces/default/options +--- etc/net/ifaces/default/options 2005-08-02 08:26:44.000000000 +0000 ++++ /etc/net/ifaces/default/options 2005-10-24 16:20:07.000000000 +0000 +@@ -24,7 +24,7 @@ + # /etc/net will try to configure interface at the first succeeding + # method. Note that etcnet will process routes and rules despite of + # BOOTPROTO. +-BOOTPROTO=static ++BOOTPROTO=dhcp + + # Defines if the interface will be automatically brought up during + # system startup or 'service network start' invocation. +diff -ruN etc/net/scripts/config-ipv4 /etc/net/scripts/config-ipv4 +--- etc/net/scripts/config-ipv4 2005-08-10 08:08:40.000000000 +0000 ++++ /etc/net/scripts/config-ipv4 2005-10-24 16:48:49.000000000 +0000 +@@ -1,5 +1,5 @@ + #!/bin/bash +- ++#set -x + . $SCRIPTDIR/functions + pickup_options + +diff -ruN etc/net/scripts/ifup /etc/net/scripts/ifup +--- etc/net/scripts/ifup 2005-09-16 18:38:01.000000000 +0000 ++++ /etc/net/scripts/ifup 2005-10-24 16:42:12.000000000 +0000 +@@ -1,5 +1,5 @@ + #!/bin/bash +- ++#set -x + # This script is intended to be run from command-line or etcnet + # initscript. It determines if the iface should be created, then + # creates the device and calls ifup-common to do the rest. +diff -ruN etc/net/scripts/ifup-common /etc/net/scripts/ifup-common +--- etc/net/scripts/ifup-common 2005-08-03 09:03:26.000000000 +0000 ++++ /etc/net/scripts/ifup-common 2005-10-24 16:42:51.000000000 +0000 +@@ -1,5 +1,5 @@ + #!/bin/bash +- ++#set -x + # This script continues configuration of an interface started by ifup, + # ifup-removable or ifup-ifplugd scripts. We assume that all necessary + # checks are done yet. +diff -ruN etc/net/scripts/network.init /etc/net/scripts/network.init +--- etc/net/scripts/network.init 2005-09-29 12:54:32.000000000 +0000 ++++ /etc/net/scripts/network.init 2005-10-24 16:41:17.000000000 +0000 +@@ -1,4 +1,5 @@ + #!/bin/bash ++#set -x + # + # network + # chkconfig: 2345 10 90 diff --git a/abs/core/etcnet/etcnet.install b/abs/core/etcnet/etcnet.install new file mode 100755 index 0000000..2605e95 --- /dev/null +++ b/abs/core/etcnet/etcnet.install @@ -0,0 +1,42 @@ +# This is a default template for a post-install scriptlet. You can +# remove any functions you don't need (and this header). + +# arg 1: the new package version +pre_install() { + /bin/cp -Rf /etc/net /etc/net.pacsave >/dev/null 2>&1 + /bin/true +} + +# arg 1: the new package version +post_install() { + /bin/true + touch /etc/net/ +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + /bin/cp -Rf /etc/net /etc/net.pacsave >/dev/null 2>&1 + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + /bin/true +} + +# arg 1: the old package version +pre_remove() { + /bin/true +} + +# arg 1: the old package version +post_remove() { + /bin/true +} + +op=$1 +shift +$op $* + diff --git a/abs/core/etcnet/functions.patch b/abs/core/etcnet/functions.patch new file mode 100644 index 0000000..c2321b6 --- /dev/null +++ b/abs/core/etcnet/functions.patch @@ -0,0 +1,12 @@ +--- scripts/functions.orig 2008-09-02 03:10:21.000000000 +0000 ++++ scripts/functions 2008-09-02 03:10:49.000000000 +0000 +@@ -16,7 +16,8 @@ + DEFAULT_IFPLUGSTATUS=/usr/sbin/ifplugstatus + DEFAULT_IFPLUGD=/usr/sbin/ifplugd + DEFAULT_IWPRIV=/sbin/iwpriv +-DEFAULT_IWCONFIG=/sbin/iwconfig ++#DEFAULT_IWCONFIG=/sbin/iwconfig ++DEFAULT_IWCONFIG=/usr/sbin/iwconfig + DEFAULT_WPA_SUPPLICANT=/usr/sbin/wpa_supplicant + DEFAULT_WPA_CLI=/usr/sbin/wpa_cli + DEFAULT_PLIPCONFIG=/sbin/plipconfig diff --git a/abs/core/etcnet/ipv4address b/abs/core/etcnet/ipv4address new file mode 100755 index 0000000..39a5dd4 --- /dev/null +++ b/abs/core/etcnet/ipv4address @@ -0,0 +1 @@ +192.168.1.5/24 diff --git a/abs/core/etcnet/ipv4route b/abs/core/etcnet/ipv4route new file mode 100755 index 0000000..b0dbb61 --- /dev/null +++ b/abs/core/etcnet/ipv4route @@ -0,0 +1 @@ +default via 192.168.1.1 diff --git a/abs/core/etcnet/network b/abs/core/etcnet/network new file mode 100644 index 0000000..a0a17ab --- /dev/null +++ b/abs/core/etcnet/network @@ -0,0 +1,6 @@ +# When set to no, this may cause most daemons' initscripts skip starting. +NETWORKING=yes +# Used by hotplug/pcmcia/ifplugd scripts to detect current network config +# subsystem. +CONFMETHOD=etcnet + diff --git a/abs/core/etcnet/options b/abs/core/etcnet/options new file mode 100755 index 0000000..23bb8bf --- /dev/null +++ b/abs/core/etcnet/options @@ -0,0 +1,62 @@ +# 0.4.0: now we don't have to specify TYPE for disabled interfaces +DISABLED=no + +# BOOTPROTO can be any of the following: static, dhcp, ipv4ll. +# * "static": use ipv4address/ipv6address +# 'static' has the same meaning as 'none' in initscripts/net-scripts sense. +# IF you don't want to assing any address to an interface, but still keep +# it up and running, you can just use 'static' and have no ipv4address file. +# * "dhcp": run DHCP client +# * "ipv4ll": run IPv4LL client (zcip) +# As far as I know, there are no working IPv6 DHCP +# implementations. IPv4LL is not required for IPv6 because of +# link-scope addresses. +# Additional feature is multi-method configurations (methods +# can be delimited by ' ', ',' or '-': +# * "dhcp-static": try DHCP, if it fails, configure static address(es) +# * "dhcp-ipv4ll": same, but fallback to IPv4LL +# * "dhcp-ipv4ll-static": try DHCP, fallback to IPv4LL (very unlikely to fail), +# fallback to static +# /etc/net will try to configure interface at the first succeeding +# method. Note that etcnet will process routes and rules despite of +# BOOTPROTO. +BOOTPROTO=dhcp-static + +# Defines if the interface will be automatically brought up during +# system startup or 'service network start' invocation. +ONBOOT=yes +USE_HOTPLUG=no +USE_PCMCIA=no +CONFIG_IPV4=yes +CONFIG_IPV6=no +CONFIG_IPX=no +CONFIG_QOS=yes +CONFIG_WIRELESS=no +CONFIG_FW=no + +# If set to yes, interface will not be set UP, but configured. +KEEP_DOWN=no +# IPv4/IPv6. Don't flush existing addresses from interface before assigning new. +DONT_FLUSH=no + +# ****************** Interface dependencies ****************** +# If interface A has REQUIRES=B in it's options file, A is the child, B is the parent. +# I don't recommend changing defaults here. See also: README/3.5 + +# If set to yes, this variable will cause ifup call for all child (having current +# interface in their REQUIRES list) after the current interface is set up. +IFUP_CHILDREN=no + +# If set to yes, this variable will cause ifup call for all parent (listed in current +# REQUIRES list) before the current interface is set up. +# Note: this will not work for ifplugd-controlled interfaces. +IFUP_PARENTS=yes + +# If set to yes, this variable will cause ifdown call for all child (having current +# interface in their REQUIRES list) before the current interface is shut down. +IFDOWN_CHILDREN=yes + +# If set to yes, this variable will cause ifdown call for all parent (listed in current +# REQUIRES list) after the current interface is shut down. +# Note: this will not work for ifplugd-controlled interfaces. +IFDOWN_PARENTS=no |