summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2014-06-16 18:00:17 -0600
committerBrian Bidulock2015-06-10 16:18:19 -0600
commit3f025e8abb8c3ed539244f2dea0a44bf7fcb6520 (patch)
treea60cad43183ad91f8b61995a2761f1d75013cf1c
parentae9a926b68e731ee079eb5a98f2adc882ca71bbc (diff)
downloadaur-3f025e8abb8c3ed539244f2dea0a44bf7fcb6520.tar.gz
version 1.99.2.r65.ga8326b7-1
-rw-r--r--.AURINFO22
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD23
-rw-r--r--smcroute.conf.example11
-rw-r--r--smcrouted.conf.d6
-rw-r--r--smcrouted.rc.d61
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
+
diff --git a/.SRCINFO b/.SRCINFO
index e2a29028614c..46a5a09e0811 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index f82fd3cffb31..073c96656539 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
+