dhcpcd-discuss

Re: preserving l2tp

Niv

Thu Dec 30 08:14:12 2010

It seems that the classless tag is missing:
I am using net-misc/dhcpcd-5.2.9 with all use flags on.
My /lib/dhcpcd/dhcpcd-hooks/60-l2tp.conf :

#/lib/dhcpcd/dhcpcd-hooks/60-l2tp.conf
#use ISP default gateway as a route for l2tp server

L2TP_SERVER_IP="98.158.112.57"
LOG="/tmp/60-l2tp.conf.log"
echo "`date '+%H%M%S_%d.%m.%Y'` invoked">>$LOG
echo "if_up:$if_up if_down:$if_down">>$LOG
set >>$LOG

if $if_up; then
	if [ -n "$new_classless_static_routes" ]; then
		echo "$new_classless_static_routes" >>$LOG
		set -- $new_classless_static_routes
		while [ -n "$1" ]; do
			if [ "$1" = "0.0.0.0/0" ]; then
				ip ro add "$L2TP_SERVER_IP" via "$2"
			fi
			shift; shift;
		done
	elif [ -n "$new_routers" ]; then
		set -- $new_routers
		ip ro add "$L2TP_SERVER_IP" via "$1"
	fi
elif $if_down; then
        if [ -n "$old_classless_static_routes" ]; then
        echo "down" >>/tmp/60-l2tp.conf.log
        echo "$old_classless_static_routes" >>$LOG
		set -- $old_classless_static_routes
		while [ -n "$1" ]; do
			if [ "$1" = "0.0.0.0/0" ]; then
				ip ro del "$L2TP_SERVER_IP" via "$2"
			fi
			shift; shift;
		done
	elif [ -n "$old_routers" ]; then
		set -- $old_routers
		ip ro del "$L2TP_SERVER_IP" via "$1"
	fi
fi

then I run
# grep classless /tmp/60-l2tp.conf.log 
and get it empty.

Follow-Ups:
Re: preserving l2tpRoy Marples
References:
preserving l2tpNiv
Re: preserving l2tpRoy Marples
Archive administrator: postmaster@marples.name