diff options
author | Tilman Klar <phoenix@gentoo.org> | 2002-08-30 16:01:52 +0000 |
---|---|---|
committer | Tilman Klar <phoenix@gentoo.org> | 2002-08-30 16:01:52 +0000 |
commit | 1a58fbd855cc70bd03ef89ff8c1ba2fd4c093a18 (patch) | |
tree | 34a9c880058769394ff298fcc3609b1e87b14298 /net-dialup | |
parent | Masking the new package net-dialup/speedtouch (diff) | |
download | historical-1a58fbd855cc70bd03ef89ff8c1ba2fd4c093a18.tar.gz historical-1a58fbd855cc70bd03ef89ff8c1ba2fd4c093a18.tar.bz2 historical-1a58fbd855cc70bd03ef89ff8c1ba2fd4c093a18.zip |
Initial import of speedtouch
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/speedtouch/ChangeLog | 12 | ||||
-rw-r--r-- | net-dialup/speedtouch/files/adsl.sample | 23 | ||||
-rw-r--r-- | net-dialup/speedtouch/files/digest-speedtouch-1.1 | 1 | ||||
-rw-r--r-- | net-dialup/speedtouch/files/speedtouch.confd | 14 | ||||
-rw-r--r-- | net-dialup/speedtouch/files/speedtouch.rc6 | 82 | ||||
-rw-r--r-- | net-dialup/speedtouch/speedtouch-1.1.ebuild | 60 |
6 files changed, 192 insertions, 0 deletions
diff --git a/net-dialup/speedtouch/ChangeLog b/net-dialup/speedtouch/ChangeLog new file mode 100644 index 000000000000..defdd86bf97d --- /dev/null +++ b/net-dialup/speedtouch/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for net-dialup/speedtouch +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/speedtouch/ChangeLog,v 1.1 2002/08/30 16:01:52 phoenix Exp $ + +*speedtouch-1.1 (30 Aug 2002) + + 30 Aug 2002; phoen][x <phoenix@gentoo.org> ChangeLog, speedtouch-1.1.ebuild + files/adsl.sample, files/digest-speedtouch-1.1, files/speedtouch.confd, + files/speedtouch.rc6: + + Initial import. Ebuild submitted by Maurizio Disimino <kevin@aptbasilicata.it>. + Thanks for the contribution. This closes bug 2300. diff --git a/net-dialup/speedtouch/files/adsl.sample b/net-dialup/speedtouch/files/adsl.sample new file mode 100644 index 000000000000..468faac6e5cc --- /dev/null +++ b/net-dialup/speedtouch/files/adsl.sample @@ -0,0 +1,23 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +# This file could be rename but its place is under /etc/ppp/peers +# To connect to Internet using this configuration file +# pppd call adsl, where "adsl" stands for the name of this file + +debug +kdebug 1 +noipdefault +defaultroute +pty "/usr/sbin/pppoa3 -m 1 -c -vpi 8 -vci 35" +sync +user "your_login_here" +noauth +noaccomp +nopcomp +noccp +novj +holdoff 4 +persist +maxfail 25 +usepeerdns diff --git a/net-dialup/speedtouch/files/digest-speedtouch-1.1 b/net-dialup/speedtouch/files/digest-speedtouch-1.1 new file mode 100644 index 000000000000..24acc1658028 --- /dev/null +++ b/net-dialup/speedtouch/files/digest-speedtouch-1.1 @@ -0,0 +1 @@ +MD5 f7828aefa97b66903f048204fadbe94c speedtouch-1.1.tar.bz2 137412 diff --git a/net-dialup/speedtouch/files/speedtouch.confd b/net-dialup/speedtouch/files/speedtouch.confd new file mode 100644 index 000000000000..cfede61a352e --- /dev/null +++ b/net-dialup/speedtouch/files/speedtouch.confd @@ -0,0 +1,14 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +# Config file for the speedtouch ebuild + +# Set the microcode path +# MICROCODE="/usr/share/speedtouch/mgmt.o" + +# Set verbose level for modem_run +VERBOSE="0" + +# Set the peer filename +# This should be in /etc/ppp/peers/ +PEER="adsl" diff --git a/net-dialup/speedtouch/files/speedtouch.rc6 b/net-dialup/speedtouch/files/speedtouch.rc6 new file mode 100644 index 000000000000..df02b5fb444c --- /dev/null +++ b/net-dialup/speedtouch/files/speedtouch.rc6 @@ -0,0 +1,82 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +PPP=$(which pppd) +MODEM_RUN=$(which modem_run) +MOUNT=$(which mount) +UMOUNT=$(which umount) +IFCONFIG=$(which ifconfig) + +MAX_LOOP=60 + +check_modem_run() { +[ "${MICROCODE:-set}" = set ] && ( eend 1 "Please define \$MICROCODE in /etc/conf.d/speedtouch" ; exit 1 ) +[ -f ${MICROCODE} ] ; eend $? "Failed to find the microcode." || exit 1 +[ -x ${MODEM_RUN} ] ; eend $? "Failed to find the 'modem_run' executable." || exit 1 + +# usbdevfs is up ? +( ${MOUNT} | grep -q usbdevfs ) || $MOUNT none /proc/bus/usb -t usbdevfs > /dev/null 2>&1 + +sleep 1 + +## Let's check if modem_run is UP. If not let's try lauching it (again)? +( ps -e | grep -q modem_run ) || $MODEM_RUN -v $VERBOSE -m -f $MICROCODE +RETURNED=$? + +sleep 1 +if [ $RETURNED -ne 0 ]; then # modem_run CAN'T run + eerror "Can't load the microcode !!" + eerror "Please detach and attach again your modem to the USB port to unload the microcode." + eerror "Then run '/etc/init.d/speedtouch start'" +return 1 +fi + +} + +depend() { +need localmount modules +} + +start() { + +ebegin "Starting Speedtouch ADSL Modem..." + +check_modem_run || eend 1 "Failed to start Speedtouch ADSL Modem..." + +[ ! -z $PPP ] ; eend $? "Failed to find ppp" || exit 1 +[ -f "/etc/ppp/peers/$PEER" ] ; eend $? "Failed to find peer configuration" || exit 1 +[ -x $IFCONFIG ] ; eend $? "Failed to find 'ifconfig'" || exit 1 + +## Allright. Start pppd. +einfo "Launching the PPP daemon..." +rm -f /var/run/pppoa*.pid +start-stop-daemon --start --exec $PPP call $PEER > /dev/null 2>&1 + +RETURNED=1 +LOOPS=0 + +# Loop until connection has been established with the ISP +# or the transaction has failed +while [ $RETURNED -ne 0 ] && [ $LOOPS -le $MAX_LOOP ] ; do + $IFCONFIG | grep -q 'ppp' + RETURNED=$? + LOOPS=`expr $LOOPS + 1` + sleep 1 +done + +if [ $LOOPS -gt $MAX_LOOP ] && [ $RETURNED -ne 0 ] ; then + eerror "Failed to start the PPP daemon" ; return 1 +fi + + +eend $? "Failed to start Speedtouch ADSL Modem..." +} + +stop () { +ebegin "Shutting down the SpeedTouch ADSL Modem..." + +start-stop-daemon --stop --pidfile /var/run/ppp0.pid pppd + +eend $? "Failed to stop 'pppd'." +} diff --git a/net-dialup/speedtouch/speedtouch-1.1.ebuild b/net-dialup/speedtouch/speedtouch-1.1.ebuild new file mode 100644 index 000000000000..34af7d24716a --- /dev/null +++ b/net-dialup/speedtouch/speedtouch-1.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-dialup/speedtouch/speedtouch-1.1.ebuild,v 1.1 2002/08/30 16:01:52 phoenix Exp $ + +DESCRIPTION="GPL Driver for the Alcatel Speedtouch USB under *nix" +SRC_URI="mirror://sourceforge/speedtouch/${P}.tar.bz2" +HOMEPAGE="http://speedtouch.sf.net" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" + +DEPEND="" +RDEPEND=">=net-dialup/ppp-2.4.1" + +src_compile() { + local myconf + + [ "${DEBUG:+set}" = set ] && myconf="--enable-debug" + use static && myconf="${myconf} --enable-static" + + sed 's/^C$/#&/' < configure > configure.new + mv --force configure.new configure && chmod u+x configure + + econf --enable-syslog \ + ${myconf} || die "./configure failed" + + sed '90,104d' < Makefile > Makefile.new + mv --force Makefile.new Makefile + emake || die "make failed" +} + +src_install () { + einstall || die + + echo $(find ${D}/usr/share/doc/speedtouch/ -type f) | xargs dodoc + rm -rf ${D}/usr/share/doc/speedtouch/ + dodoc AUTHORS COPYING ChangeLog INSTALL TODO VERSION + rm -r ${D}/etc/init.d/speedtouch + exeinto /etc/init.d ; newexe ${FILESDIR}/speedtouch.rc6 speedtouch + insinto /etc/conf.d ; newins ${FILESDIR}/speedtouch.confd speedtouch + insopts -m 600 ; insinto /etc/ppp/peers ; doins ${FILESDIR}/adsl.sample +} + +pkg_postinst() { + echo "" + ewarn "Make sure you have kernel support for USB, HDCL and PPP" + ewarn "NB: kernels >= 2.4.18 include the hdlc patch" + echo "" + ewarn "Read and subscribe vendor's licence to download the microcode" + ewarn "You can get it from: " + ewarn " 1) vendor's site: http://www.speedtouchdsl.com/dvrreg_lx.htm" + ewarn " 2) a windows system: c:\windows\system\alcaudsl.sys" + ewarn " 3) the CD provided: X:\Driver\alcaudsl.sys" + ewarn "Then you should set its path in the /etc/conf.d/speedtouch file" + ewarn "edit and rename 'adsl.sample' to 'adsl' in /etc/ppp/peers/adsl and" + ewarn "bring up your adsl line using the /etc/init.d/speedtouch script" + echo "" + einfo "More info in the documentation in /usr/share/doc/${P}" + echo "" +} |