Thu, 04 Oct 2012 20:26:02 +0200
Import package vendor original spec for necessary manipulations.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.arpd -- Run-Commands
4 ##
6 %config
7 arpd_enable="$openpkg_rc_def"
8 arpd_log_prolog="true"
9 arpd_log_epilog="true"
10 arpd_log_numfiles="10"
11 arpd_log_minsize="1M"
12 arpd_log_complevel="9"
13 arpd_ip_network="192.168.100.0/24"
14 arpd_if=""
16 %common
17 arpd_pidfile="@l_prefix@/var/arpd/arpd.pid"
18 arpd_signal () {
19 [ -f $arpd_pidfile ] && kill -$1 `cat $arpd_pidfile`
20 }
22 %status -u @l_susr@ -o
23 arpd_usable="unknown"
24 arpd_active="no"
25 rcService arpd enable yes && \
26 arpd_signal 0 && arpd_active="yes"
27 echo "arpd_enable=\"$arpd_enable\""
28 echo "arpd_usable=\"$arpd_usable\""
29 echo "arpd_active=\"$arpd_active\""
31 %start -u @l_susr@
32 rcService arpd enable yes || exit 0
33 rcService arpd active yes && exit 0
34 if [ ".$arpd_if" != . ]; then
35 arpd_interface="-i $arpd_if"
36 fi
37 @l_prefix@/sbin/arpd \
38 $arpd_interface \
39 $arpd_ip_network \
40 >/dev/null 2>&1
42 %stop -u @l_susr@
43 rcService arpd enable yes || exit 0
44 rcService arpd active no && exit 0
45 arpd_signal TERM
47 %restart -u @l_susr@
48 rcService arpd enable yes || exit 0
49 rcService arpd active no && exit 0
50 rc arpd start
51 sleep 2
52 rc arpd stop
54 %reload -u @l_susr@
55 rcService arpd enable yes || exit 0
56 rcService arpd active no && exit 0
57 arpd_signal HUP
59 %daily -u @l_susr@
60 rcService arpd enable yes || exit 0
61 shtool rotate -f \
62 -n ${arpd_log_numfiles} -s ${arpd_log_minsize} -d \
63 -z ${arpd_log_complevel} -o @l_susr@ -g @l_rgrp@ -m 644 \
64 -P "${arpd_log_prolog}" \
65 -E "${arpd_log_epilog}; rc arpd restart" \
66 @l_prefix@/var/arpd/arpd.log