[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

help needed with ppp-udeb



The ppp-udeb .udeb package is available at
http://www.bofh.it/~md/debian/ .
It contains an incomplete configuration frontend, I'm asking for the
help of other developers to complete it.

Related question: are modules autoloaded as usual or should postinst
manually modprobe all the modules needed?


I'm attaching the postinst and templates files.

-- 
ciao, |
Marco | [3456 sayRCqT05.W6M]
#!/bin/sh -e
echo "================ $0 DISABLED ================"; exit 0

# TODO:
# - do not ask to choose the interface if there is only one
# - what about resolv.conf? usepeerdns is enabled
# - the configuration files should be copied to /target. How/when?

. /usr/share/debconf/confmodule

# FIXME I suppose there is a better way to do this in d-i
#INTERFACES=$(LANG=C /sbin/ifconfig -a | grep "Ethernet" | cut -f1 -d" ")
#INTERFACES=$(echo $INTERFACES | sed -e 's/ /, /g')

db_get ppp/interface
if [ -z "$RET" ]; then
  db_subst ppp/interface INTERFACES "$INTERFACES"
  db_input high ppp/interface || true
  db_go || true
  db_get ppp/interface
  echo "$RET"
fi

# FIXME: other questions...

db_stop

cat <<EOF > /etc/ppp/peers/pppoe
# kernel space PPPoE driver example configuration
#
# See the manual page pppd(8) for information on all the options.

# MUST CHANGE: Uncomment the following line, replacing the user@provider.net
# by the DSL user name given to your by your DSL provider.
# There should be a matching entry with the password in /etc/ppp/pap-secrets
# and/or /etc/ppp/chap-secrets.
#user "myusername@myprovider.net"
user "$USERNAME"

# Load the pppoe plugin. Change the ethernet interface name if needed.
plugin rp-pppoe.so
$INTERFACE

# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
# Comment out if you already have the correct default route installed.
defaultroute

# Makes pppd "dial again" when the connection is lost.
persist

# Do not ask the remote to authenticate.
noauth

# RFC 2516, paragraph 7 mandates that the following options MUST NOT be
# requested and MUST be rejected if requested by the peer:
# Address-and-Control-Field-Compression (ACFC)
noaccomp
# Asynchronous-Control-Character-Map (ACCM)
default-asyncmap

# Do not try to negotiate other kinds of compression.
nopcomp
noccp
novj
EOF

cat <<EOF > /etc/ppp/pap-secrets
#GENERATED-BY-DEBIAN-INSTALLER#
$USERNAME	*	$PASSWORD
EOF
cp /etc/ppp/pap-secrets /etc/ppp/chap-secrets

pppd call pppoe

#DEBHELPER#

exit 0
Template: debian-installer/ppp-udeb/title
Type: text
_Description: Configure and start PPPoE networking

Template: ppp/interface
Type: select
Choices: ${INTERFACES}
_Description: Interface name
 Choose the name of the network interface connected to your PPPoE modem.

Template: ppp/username
Type: string
_Description: Your username

Template: ppp/password
Type: password
_Description: Your password

Reply to: