- REDIAL=$(nvram get ppp_redialperiod)
- REDIAL=${REDIAL:+lcp-echo-interval $REDIAL}
- IDLETIME=$(nvram get ppp_idletime)
- IDLETIME=${IDLETIME:+lcp-echo-failure $IDLETIME}
+ KEEPALIVE=$(nvram get ppp_redialperiod)
+ KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 10 lcp-echo-failure $KEEPALIVE}
+ DEMAND=$(nvram get ppp_demand)
+ case "$DEMAND" in
+ on|1|enabled)
+ DEMAND=$(nvram get ppp_idletime)
+ DEMAND=${IDLETIME:+demand idle $IDLETIME}
+ ;;
+ *) DEMAND="";;
+ esac