Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=833e58a86510f96b6e82a1682ea0a5a2e1546d1c
commit 833e58a86510f96b6e82a1682ea0a5a2e1546d1c Author: James Buren <[email protected]> Date: Thu Jul 12 09:01:31 2012 -0500 iproute2-3.4.0-1-x86_64 * convert to systemd schema diff --git a/source/network/iproute2/FrugalBuild b/source/network/iproute2/FrugalBuild index 92c6e70..4d1b8b8 100644 --- a/source/network/iproute2/FrugalBuild +++ b/source/network/iproute2/FrugalBuild @@ -3,19 +3,22 @@ # Maintainer: voroskoi <[email protected]> pkgname=iproute2 -pkgver=2.6.38 +pkgver=3.4.0 pkgrel=1 pkgdesc="kernel routing and traffic control utilities." -url="http://www.linuxfoundation.org/en/Net:Iproute2" +url="http://www.kernel.org" groups=('network') backup=('etc/sysconfig/ipv6tunnel' 'etc/iproute2/rt_tables') archs=('i686' 'x86_64') depends=('glibc' 'db>=4.7.25') makedepends=('iptables') -up2date="Flasttar http://devresources.linux-foundation.org/dev/iproute2/download/" -source=(http://devresources.linux-foundation.org/dev/iproute2/download/$pkgname-$pkgver.tar.bz2 \ - {rc.,}ipv6tunnel) -signatures=("$source.sig" '' '') +up2date="Flasttar http://kernel.org/pub/linux/utils/net/$pkgname" +source=(http://kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz \ + {rc.,}ipv6tunnel ipv6tunnel_setup ipv6tunnel.service) +signatures=("${source/.tar.xz/.tar}.sign" '' '' '' '') +_F_sysvinit_units=(ipv6tunnel) +_F_systemd_units=(ipv6tunnel=) +Finclude systemd build() { Fsed 'DOCDIR=/share/doc/iproute2' "DOCDIR=${Fprefix}/share/doc/iproute2-${pkgver}" Makefile @@ -25,6 +28,9 @@ build() { Fbuild Ffile /etc/sysconfig/ipv6tunnel Frcd2 ipv6tunnel + Ffile /lib/systemd/system/ipv6tunnel.service + Fexe /sbin/ipv6tunnel_setup + Fgenscriptlet } # optimization OK diff --git a/source/network/iproute2/ipv6tunnel.service b/source/network/iproute2/ipv6tunnel.service new file mode 100644 index 0000000..4395c5a --- /dev/null +++ b/source/network/iproute2/ipv6tunnel.service @@ -0,0 +1,12 @@ +[Unit] +Description=IPv6 Tunnels +After=network.target + +[Service] +ExecStart=/sbin/ipv6tunnel_setup on +ExecStop=/sbin/ipv6tunnel_setup off +RemainAfterExit=yes +Type=oneshot + +[Install] +WantedBy=multi-user.target diff --git a/source/network/iproute2/ipv6tunnel_setup b/source/network/iproute2/ipv6tunnel_setup new file mode 100644 index 0000000..098a8ac --- /dev/null +++ b/source/network/iproute2/ipv6tunnel_setup @@ -0,0 +1,18 @@ +#!/bin/sh + +source /etc/sysconfig/ipv6tunnel + +if [ "$1" = "on" ]; then + ip tunnel add sixbongw mode sit remote $remote ttl 64 + ip link set sixbongw up + for i in "${addresses[@]}"; do + ip address add $i dev sixbongw + done + ip -6 route add default dev sixbongw + exit 0 +elif [ "$1" = "off" ]; then + ip tunnel del sixbongw + exit 0 +fi + +exit 1 _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
