diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2008-01-01 11:52:51 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2008-01-01 11:52:51 +0000 |
commit | 7f5b4d4612d1a60a9fd5ce38f03c5e7afeeebccf (patch) | |
tree | 976efd694fcd77bb905caede01b5bd4ee8b48e51 /net/mpd-l2tp-ipv6pd-client/scripts/setting | |
parent | - Add support for SRC_BASE and MAKEOBJDIRPREFIX if using KERNCONF (diff) |
New port - mpd-l2tp-ipv6pd-client
A sample implementaiton set of "L2TP-IPv6PD" client using mpd.
"OCN IPv6", provided by NTT Communications Corp, was the first
commercial tunnel service using "L2TP-IPv6PD".
NOTE: This port runs on FreeBSD 6.3 and later. If you want to run it
on FreeBSD 6.2, you need to apply following diff to your ng_ksocket:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ng_ksocket.c.diff?r1=1.59&r2=1.60
WWW: http://www.ocn.v6.ntt.net/ocnipv6/pdf/ocnipv6uni_ver1.0.pdf
Diffstat (limited to '')
-rw-r--r-- | net/mpd-l2tp-ipv6pd-client/scripts/setting | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/net/mpd-l2tp-ipv6pd-client/scripts/setting b/net/mpd-l2tp-ipv6pd-client/scripts/setting new file mode 100644 index 000000000000..716081745561 --- /dev/null +++ b/net/mpd-l2tp-ipv6pd-client/scripts/setting @@ -0,0 +1,142 @@ +#!/bin/sh + +DATE=`${WHICH} date` + +# user id +tempfile=`${MKTEMP} -t ipv6pd` +${DIALOG} --title "L2TP-IPv6PD Setup Helper" --clear \ + --inputbox "Please Input User ID:" -1 -1 2> ${tempfile} +retval=$? +case $retval in +0) + ppp_id=`${CAT} ${tempfile}` + ${RM} ${tempfile} + ;; +1) + ${RM} ${tempfile} + exit + ;; +255) + ${RM} ${tempfile} + exit + ;; +esac + +# passwd +tempfile=`${MKTEMP} -t ipv6pd` +${DIALOG} --title "L2TP-IPv6PD Setup Helper" \ + --inputbox "Please Input Passwd:" -1 -1 \ + 2> ${tempfile} +case $retval in +0) + ppp_passwd=`${CAT} ${tempfile}` + ${RM} ${tempfile} + ;; +1) + ${RM} ${tempfile} + exit + ;; +255) + ${RM} ${tempfile} + exit + ;; +esac + +# fixed server +tempfile=`${MKTEMP} -t ipv6pd` +${DIALOG} --title "L2TP-IPv6PD Setup Helper" \ + --inputbox "Please Input L2TP-IPv6PD Server\n(Fixed Prefix):" \ + -1 -1 2> ${tempfile} +case $retval in +0) + fixed_server=`${CAT} ${tempfile}` + ${RM} ${tempfile} + ;; +1) + ${RM} ${tempfile} + exit + ;; +255) + ${RM} ${tempfile} + exit + ;; +esac + +# Set PPP Interface +tempfile=`${MKTEMP} -t ipv6pd` +${DIALOG} --title "L2TP-IPv6PD Setup Helper" \ + --inputbox "Please Input PPP Interface (default: ng0):" -1 -1 \ + 2> ${tempfile} +case $retval in +0) + interface=`${CAT} ${tempfile}` + if [ -z "${interface}" ]; then + interface="ng0" + fi + ${RM} ${tempfile} + ;; +1) + ${RM} ${tempfile} + exit + ;; +255) + ${RM} ${tempfile} + exit + ;; +esac + +# Set Prefix Delegation Interface +tempfile=`${MKTEMP} -t ipv6pd` +${DIALOG} --title "L2TP-IPv6PD Setup Helper" \ + --inputbox "Please Input Prefix Delegation Interface:" -1 -1 \ + 2> ${tempfile} +case $retval in +0) + pd_interface=`${CAT} ${tempfile}` + ${RM} ${tempfile} + ;; +1) + ${RM} ${tempfile} + exit + ;; +255) + ${RM} ${tempfile} + exit + ;; +esac + +for infile in ${SCRIPTDIR}/*.in; do + outfile=${WRKDIR}/`basename ${infile} .in` + ${SED} -e "s|%%PPP_ID%%|${ppp_id}|g" \ + -e "s|%%PPP_PASSWD%%|${ppp_passwd}|g" \ + -e "s|%%FIXED_SERVER%%|${fixed_server}|g" \ + -e "s|%%INTERFACE%%|${interface}|g" \ + -e "s|%%PD_INTERFACE%%|${pd_interface}|g" \ + -e "s|%%RC_SUBR%%|${RC_SUBR}|g" \ + -e "s|%%PREFIX%%|${PREFIX}|g" \ + -e "s|%%CONF_DIR%%|${CONF_DIR}|g" \ + -e "s|%%MD5%%|${MD5}|g" \ + -e "s|%%SED%%|${SED}|g" \ + -e "s|%%DATE%%|${DATE}|g" \ + < ${infile} > ${outfile} +done + +outfile="${WRKDIR}/pkg-message" +cat <<EOF > ${outfile} + + + +Type following commands to complete setup: + + # mkdir /etc/rc.conf.d + # cp ${PREFIX}/${CONF_DIR}/${MPD_NAME} /etc/rc.conf.d/${MPD_NAME} + +If you are not using 6.3-RELEASE nor later, apply following patch and +rebuild your kernel: + + http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ng_ksocket.c.diff?r1=1.59&r2=1.60 + + + + +EOF |