evaluate_retval
run_subdir ${rc_base}/init.d/networking/red.up/
-
+
+ # Configure aliases only if red static
+ /usr/local/bin/setaliases
+
elif [ "${TYPE}" == "DHCP" ]; then
+
+ if [ -e $LEASEINFO ]; then
+ boot_mesg -n "Stopping dhcpcd on the ${DEVICE} interface..."
+ . $LEASEINFO
+ if [ "$LEASETIME" = "4294967295" ]; then
+ # do nothing, just echo ok
+ echo ""
+ echo_ok
+ else
+ if [ -n "$DHCP_STOP" ]; then
+ /sbin/dhcpcd ${DEVICE} $DHCP_STOP &> /dev/null
+ RET="$?"
+ if [ "$RET" -eq 0 ]; then
+ echo ""
+ echo_ok
+ elif [ "$RET" -eq 1 ]; then
+ boot_mesg "dhcpcd not running!" ${WARNING}
+ echo_warning
+ else
+ echo ""
+ echo_failure
+ fi
+ else
+ echo ""
+ killproc dhcpcd
+ fi
+ fi
+ fi
+
boot_mesg -n "Starting dhcpcd on the ${DEVICE} interface..."
echo -n "${DEVICE}" > /var/ipfire/red/iface
echo "$GATEWAY gateway" >> /tmp/hosts
mv /tmp/hosts /etc/hosts
echo "$GATEWAY" > /var/ipfire/red/remote-ipaddress
+ touch /var/ipfire/red/active
else
echo ""
$(exit "$RET")
/usr/bin/vnstat -u -i ppp0 -r --enable --force > /dev/null 2>&1
/etc/rc.d/init.d/connectd start
# Add a NaN value to ppp0 rrd to supress spikes at reconnect
- rrdtool $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrf \
- $(date +%s)::
+ rrdtool update $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \
+ $(date +%s):: > /dev/null 2>&1
exit 0
fi
;;
killall -w -s TERM /usr/sbin/pppd 2>/dev/null
evaluate_retval
# Add a NaN value to ppp0 rrd to supress spikes at reconnect
- rrdtool $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrf \
- $(date +%s)::
+ rrdtool update $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \
+ $(date +%s):: > /dev/null 2>&1
fi
if [ "$DEVICE" != "${GREEN_DEV}" ] && [ "$DEVICE" != "" ]; then