3 # init script for arptables
5 # Original by Dag Wieers <dag@wieers.com>.
6 # Modified/changed to arptables by
7 # Rok Papez <rok.papez@arnes.si>.
9 # Adapted for Archlinux by Michal Soltys <soltys@ziu.info>
17 [ -x /usr
/sbin
/arptables
] ||
exit 1
18 [ -x /usr
/sbin
/arptables-save
] ||
exit 1
19 [ -x /usr
/sbin
/arptables-restore
] ||
exit 1
22 stat_busy
"Starting arptables"
23 [[ ! -r /etc
/arptables
/arptables
]] && :>/etc
/arptables
/arptables
25 /usr
/sbin
/arptables-restore
</etc
/arptables
/arptables || RETVAL
=1
27 if (( $RETVAL == 0 )); then
36 stat_busy
"Stopping arptables"
37 /usr
/sbin
/arptables-restore
</dev
/null || RETVAL
=1
39 if (( $RETVAL == 0 )); then
54 stat_busy
"Saving arptables"
55 /usr
/sbin
/arptables-save
>/etc
/arptables
/arptables || RETVAL
=1
57 (( $RETVAL == 0 )) && stat_done || stat_fail
62 if ! ck_daemon arptables
; then
63 printhl
"Arptables already started"
70 if ck_daemon arptables
; then
71 printhl
"Arptables not yet started"
84 /usr
/sbin
/arptables-save
88 echo $
"Usage $0 {start|stop|restart|save|status}"