summaryrefslogtreecommitdiffstats
path: root/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
commit224068b0aa35f82b7d1224789bf8d6904771206d (patch)
tree5ff9996a432b1b669793c44e4ea7dd26c1b16445 /package/vrrpd/files
parentec10c9c3647c4d93d61e12b86db7e92d0b661ff5 (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/openwrt@2674 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/vrrpd/files')
-rw-r--r--package/vrrpd/files/vrrpd.default4
-rw-r--r--package/vrrpd/files/vrrpd.init21
2 files changed, 25 insertions, 0 deletions
diff --git a/package/vrrpd/files/vrrpd.default b/package/vrrpd/files/vrrpd.default
new file mode 100644
index 000000000..0dfee0cfb
--- /dev/null
+++ b/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/package/vrrpd/files/vrrpd.init b/package/vrrpd/files/vrrpd.init
new file mode 100644
index 000000000..5afc73438
--- /dev/null
+++ b/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 $?