summaryrefslogtreecommitdiff
path: root/openwrt/package/vrrpd/files
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-12-14 23:01:47 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-12-14 23:01:47 +0000
commit255f4a5db849255fa6763bbb02de5eca7fedd34b (patch)
treec4fcb7152ce0a9ee86ee01172187c4bc7d60ac93 /openwrt/package/vrrpd/files
parentf1b472db7ee3ea12e2a6ed9b22151502d9653805 (diff)
fix package name in template call, remove unneeded patch,
don't use PKG_INSTALL_DIR since upstream does not provide a make install target, add configurable init script, add Id tag and target optimization cflags.. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2674 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/vrrpd/files')
-rw-r--r--openwrt/package/vrrpd/files/vrrpd.default4
-rw-r--r--openwrt/package/vrrpd/files/vrrpd.init21
2 files changed, 25 insertions, 0 deletions
diff --git a/openwrt/package/vrrpd/files/vrrpd.default b/openwrt/package/vrrpd/files/vrrpd.default
new file mode 100644
index 0000000000..0dfee0cfb9
--- /dev/null
+++ b/openwrt/package/vrrpd/files/vrrpd.default
@@ -0,0 +1,4 @@
+ID=1
+IF=vlan1
+IP=10.0.0.1
+OPTIONS="-i $IF -v $ID $IP"
diff --git a/openwrt/package/vrrpd/files/vrrpd.init b/openwrt/package/vrrpd/files/vrrpd.init
new file mode 100644
index 0000000000..5afc734381
--- /dev/null
+++ b/openwrt/package/vrrpd/files/vrrpd.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BIN=vrrpd
+DEFAULT=/etc/default/$BIN
+[ -f $DEFAULT ] && . $DEFAULT
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
+
+case $1 in
+ start)
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?