1 # arg 1:the new package version
4 #do pre-install stuff here
9 # arg 1:the new package version
11 cat > /etc/conf.d/zebra << "EOF"
12 ZEBRA_DAEMONS="zebra ospfd ripd bgpd"
15 cat > /etc/rc.d/zebrad << "EOF"
19 [ -f /etc/conf.d/zebra ] && . /etc/conf.d/zebra
23 [ -f /usr/sbin/zebra ] || exit 0
24 [ -f /usr/sbin/ospfd ] || exit 0
25 [ -f /usr/sbin/ripd ] || exit 0
26 [ -f /usr/sbin/bgpd ] || exit 0
28 ZEBRAPID="/var/run/${daemon}.pid"
32 for daemon in $ZEBRA_DAEMONS; do
33 stat_busy "Starting Zebra ${daemon}: "
34 /usr/sbin/${daemon} -d &> /dev/null
45 for daemon in $ZEBRA_DAEMONS; do
46 stat_busy "Stopping Zebra ${daemon}: "
47 PID="cat /var/run/$daemon.pid"
49 CMD=`kill $PID2 &> /dev/null`
50 CMD="/bin/rm /var/run/$daemon.pid"
51 CMD2=`$CMD &> /dev/null`
52 if [ -f /var/run/$daemon.pid ] ; then
65 echo "usage: $0 {start|stop|restart}"
69 chmod +x /etc/rc.d/zebrad
71 #do post-install stuff here
76 # arg 1:the new package version
77 # arg 2:the old package version
80 #do pre-upgrade stuff here
85 # arg 1:the new package version
86 # arg 2:the old package version
89 #do post-upgrade stuff here
94 # arg 1:the old package version
97 #do pre-remove stuff here
102 # arg 1:the old package version
107 #do post-remove stuff here