diff options
author | Brian Bidulock | 2014-06-16 18:00:17 -0600 |
---|---|---|
committer | Brian Bidulock | 2015-06-10 16:18:19 -0600 |
commit | 3f025e8abb8c3ed539244f2dea0a44bf7fcb6520 (patch) | |
tree | a60cad43183ad91f8b61995a2761f1d75013cf1c | |
parent | ae9a926b68e731ee079eb5a98f2adc882ca71bbc (diff) | |
download | aur-3f025e8abb8c3ed539244f2dea0a44bf7fcb6520.tar.gz |
version 1.99.2.r65.ga8326b7-1
-rw-r--r-- | .AURINFO | 22 | ||||
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | smcroute.conf.example | 11 | ||||
-rw-r--r-- | smcrouted.conf.d | 6 | ||||
-rw-r--r-- | smcrouted.rc.d | 61 |
6 files changed, 112 insertions, 24 deletions
diff --git a/.AURINFO b/.AURINFO new file mode 100644 index 000000000000..55d9151a7ad1 --- /dev/null +++ b/.AURINFO @@ -0,0 +1,22 @@ +pkgbase = smcroute-git + pkgdesc = A command line tool to manipulate the multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast routing. + pkgver = 1.99.2.r65.ga8326b7 + pkgrel = 1 + url = https://github.com/troglobit/smcroute + arch = i686 + arch = x86_64 + license = GPL2 + depends = bash + provides = smcroute + provides = mcsender + conflicts = smcroute + conflicts = mcsender + source = smcroute-git::git+https://github.com/troglobit/smcroute.git + source = smcroute.conf.example + source = smcrouted.conf.d + source = smcrouted.rc.d + backup = etc/smcroute.conf + backup = etc/conf.d/smcrouted + +pkgname = smcroute-git + @@ -1,23 +1,26 @@ pkgbase = smcroute-git pkgdesc = A command line tool to manipulate the multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast routing. - pkgver = 2.0.0.r4.g73f6f14 + pkgver = 1.99.2.r65.ga8326b7 pkgrel = 1 url = https://github.com/troglobit/smcroute arch = i686 arch = x86_64 license = GPL2 - depends = glibc + depends = bash provides = smcroute provides = mcsender conflicts = smcroute conflicts = mcsender backup = etc/smcroute.conf + backup = etc/conf.d/smcrouted source = smcroute-git::git+https://github.com/troglobit/smcroute.git source = smcroute.conf.example - source = smcroute.service + source = smcrouted.conf.d + source = smcrouted.rc.d md5sums = SKIP - md5sums = 98bdb5bbd222686761e318ee04825b7a - md5sums = 7b28500642045b2482f5ac873da0f86b + md5sums = 59fdb2baf1184d0cb5c59b576b1b5e1c + md5sums = aed88a7472e9daef0b783d017735c8f4 + md5sums = b925ad844fe57f017ed5f840b86e701d pkgname = smcroute-git @@ -1,23 +1,26 @@ # Maintainer: Brian Bidulock <bidulock@openss7.org> pkgname="smcroute-git" -pkgver=2.0.0.r4.g73f6f14 +pkgver=1.99.2.r65.ga8326b7 pkgrel=1 pkgdesc="A command line tool to manipulate the multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast routing." arch=('i686' 'x86_64') url="https://github.com/troglobit/smcroute" license=('GPL2') -depends=('glibc') +groups=() +depends=('bash') provides=('smcroute' 'mcsender') conflicts=('smcroute' 'mcsender') -backup=('etc/smcroute.conf') +backup=('etc/smcroute.conf' 'etc/conf.d/smcrouted') source=("$pkgname::git+https://github.com/troglobit/smcroute.git" 'smcroute.conf.example' - 'smcroute.service') + 'smcrouted.conf.d' + 'smcrouted.rc.d') noextract=() md5sums=('SKIP' - '98bdb5bbd222686761e318ee04825b7a' - '7b28500642045b2482f5ac873da0f86b') + '59fdb2baf1184d0cb5c59b576b1b5e1c' + 'aed88a7472e9daef0b783d017735c8f4' + 'b925ad844fe57f017ed5f840b86e701d') pkgver() { cd $pkgname @@ -26,7 +29,7 @@ pkgver() { build() { cd $pkgname - ./configure --prefix=/usr --sbindir=/usr/bin + ./configure --prefix=/usr make } @@ -34,10 +37,10 @@ package() { cd $pkgname make DESTDIR="$pkgdir/" install + # install rc script and its configuration file install -Dm644 "${srcdir}/smcroute.conf.example" "${pkgdir}/etc/smcroute.conf" - install -Dm644 "${srcdir}/smcroute.service" "${pkgdir}/usr/lib/systemd/system/smcroute.service" - # nothing useful here - rm -fr "${pkgdir}/usr/share/doc" + install -Dm644 "${srcdir}/smcrouted.conf.d" "${pkgdir}/etc/conf.d/smcrouted" + install -Dm755 "${srcdir}/smcrouted.rc.d" "${pkgdir}/etc/rc.d/smcrouted" } # vim:set ts=2 sw=2 et: diff --git a/smcroute.conf.example b/smcroute.conf.example index d8b8d73cd54c..b587fc706c39 100644 --- a/smcroute.conf.example +++ b/smcroute.conf.example @@ -11,21 +11,14 @@ # # Syntax: # mgroup from IFNAME group MCGROUP -# mroute from IFNAME [source ADDRESS] group MCGROUP to IFNAME [IFNAME ...] +# mroute from IFNAME source ADDRESS group MCGROUP to IFNAME [IFNAME ...] # # The following example instructs the kernel to join the multicast # group 225.1.2.3 on interface eth0. Followed by setting up an # mroute of the same multicast stream, but from the explicit sender # 192.168.1.42 on the eth0 network and forward to eth1 and eth2. # + # mgroup from eth0 group 225.1.2.3 # mroute from eth0 group 225.1.2.3 source 192.168.1.42 to eth1 eth2 -# Here we allow routing of multicast to group 225.3.2.1 from ANY -# source coming in from interface eth0 and forward to eth1 and eth2. -# NOTE: Routing from ANY source is currently only available for IPv4 -# multicast. -# -# mgroup from eth0 group 225.3.2.1 -# mroute from eth0 group 225.3.2.1 to eth1 eth2 - diff --git a/smcrouted.conf.d b/smcrouted.conf.d new file mode 100644 index 000000000000..79c7dbaef581 --- /dev/null +++ b/smcrouted.conf.d @@ -0,0 +1,6 @@ +# Arguments for smcrouted +# example: Enable additional debug messages. +# SMCROUTED_ARGS="-D" + +# Specify an alternative configuration file, instead of the default '/etc/smcroute.conf'. +# SMCROUTED_CONFFILE="/etc/smcroute.conf" diff --git a/smcrouted.rc.d b/smcrouted.rc.d new file mode 100644 index 000000000000..ba37e6d38bd1 --- /dev/null +++ b/smcrouted.rc.d @@ -0,0 +1,61 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/conf.d/smcrouted +. /etc/rc.d/functions + +# smcroute writes its process ID to /var/run/smcroute.pid upon startup. +PIDFILE="/var/run/smcroute.pid" + +# Specify the default configuration file '/etc/smcroute.conf'. +[[ -z "$SMCROUTED_CONFFILE" ]] && SMCROUTED_CONFFILE="/etc/smcroute.conf" + +if [[ -f $PIDFILE ]]; then + read -r PID < "$PIDFILE" + + # prevent stale pidfiles from hanging around + if [[ ! -d /proc/$PID ]]; then + echo 'pid not found. deleteing stale pidfile' + unset PID + rm -f "$PIDFILE" + fi +fi + +case "$1" in + start) + stat_busy "Starting SMCRoute Server" + if [[ $PID ]]; then + stat_fail + exit 1 + fi + if /usr/sbin/smcroute -d -f "$SMCROUTED_CONFFILE" $SMCROUTED_ARGS; then + add_daemon smcrouted + stat_done + else + stat_fail + exit 1 + fi + ;; + stop) + stat_busy "Stopping SMCRoute Server" + if [[ ! $PID ]]; then + stat_fail + exit 1 + fi + if { smcroute -k; } &>/dev/null; then + rm_daemon smcrouted + stat_done + else + stat_fail + exit 1 + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac + |