summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Mehnert <hannes@gentoo.org>2002-11-24 22:00:41 +0000
committerHannes Mehnert <hannes@gentoo.org>2002-11-24 22:00:41 +0000
commitec8d8a6a6c28e0bde612b4040f1049e602d4d4c0 (patch)
tree7a2370ac0e2a65225ba83e0c88dff6a6a3e240ae /net-dialup/kpnadsl4linux
parentmove the autotools deps from set-kdedir to need-kde (whyever were they in set... (diff)
downloadhistorical-ec8d8a6a6c28e0bde612b4040f1049e602d4d4c0.tar.gz
historical-ec8d8a6a6c28e0bde612b4040f1049e602d4d4c0.tar.bz2
historical-ec8d8a6a6c28e0bde612b4040f1049e602d4d4c0.zip
initial ebuild, thanks to sambesselink@planet.nl (sam) for submission
Diffstat (limited to 'net-dialup/kpnadsl4linux')
-rw-r--r--net-dialup/kpnadsl4linux/ChangeLog9
-rw-r--r--net-dialup/kpnadsl4linux/files/digest-kpnadsl4linux-1.101
-rw-r--r--net-dialup/kpnadsl4linux/kpnadsl4linux-1.10.ebuild122
3 files changed, 132 insertions, 0 deletions
diff --git a/net-dialup/kpnadsl4linux/ChangeLog b/net-dialup/kpnadsl4linux/ChangeLog
new file mode 100644
index 000000000000..0a17b2aa6f8f
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for net-dialup/kpnadsl4linux
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/kpnadsl4linux/ChangeLog,v 1.1 2002/11/24 22:00:32 hannes Exp $
+
+*kpnadsl4linux-1.10 (24 Nov 2002)
+
+ 24 Nov 2002; Hannes Mehnert <hannes@gentoo.org> kpnadsl4linux-1.10.ebuild,
+ ChangeLog: Initial ebuild. Thanks to sambesselink@planet.nl (sam)
+ for submission (10444#).
diff --git a/net-dialup/kpnadsl4linux/files/digest-kpnadsl4linux-1.10 b/net-dialup/kpnadsl4linux/files/digest-kpnadsl4linux-1.10
new file mode 100644
index 000000000000..841486213b15
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/files/digest-kpnadsl4linux-1.10
@@ -0,0 +1 @@
+MD5 4f9847ce5b60440924349e27683dc314 kpnadsl4linux-1.10.tar.gz 15210
diff --git a/net-dialup/kpnadsl4linux/kpnadsl4linux-1.10.ebuild b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.10.ebuild
new file mode 100644
index 000000000000..51c1b4026f00
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.10.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/kpnadsl4linux/kpnadsl4linux-1.10.ebuild,v 1.1 2002/11/24 22:00:40 hannes Exp $
+
+IUSE=""
+DESCRIPTION="ADSL4Linux, a PPTP start/stop/etc. program especially for Dutch users, for gentoo."
+HOMEPAGE="http://www.adsl4linux.nl/"
+SRC_URI="http://home.planet.nl/~mcdon001/${P}.tar.gz
+ http://www.adsl4linux.nl/download/${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+DEPEND="virtual/glibc"
+RDEPEND="sys-apps/gawk
+ >=net-dialup/pptpclient-1.1.0
+ >=net-dialup/ppp-2.4.0"
+
+src_compile() {
+ make || die "Make failed."
+}
+
+src_install() {
+ dosbin adsl
+ dodoc COPYING Changelog INSTALL README
+ exeinto /etc/init.d/
+ newexe init.d.adsl adsl
+}
+
+pkg_postinst() {
+ einfo "\e[32;01m * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\033[0m"
+ einfo "\e[31;31;01m Please do _NOT_ forget to run the following: \e[32;01m *\033[0m"
+ einfo "\e[33;01m 'ebuild /var/db/pkg/${CATEGORY}/${P}/${P}.ebuild config' \e[32;01m* \033[0m"
+ einfo " \e[32;01m*\033[0m"
+ einfo "\e[31;31;01m To start ${P} at boot type: \e[32;01m*\033[0m"
+ einfo "\e[33;01m 'rc-update add adsl default' \e[32;01m*\033[0m"
+ einfo "\e[32;01m * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\033[0m"
+}
+
+pkg_config() {
+
+a4lvarconfig() {
+ # Get username, password and 'phonenumber' (pc1/pc2/pc3/...)
+ echo "What's your username? (ie. myname@subscription-form)"; read USERNAME;
+ echo ""
+ echo "What's your password?"; read PAWD;
+ echo ""
+ echo "If you have a subscription with multiple ip addresses, please specify your 'pc-number'? (ie. pc3) Press ENTER if you have no idea what I'm talking about."; read PCNUMBER;
+ echo ""
+ if [ -z ${PCNUMBER} ]; then PCNUMBER=pc1; else :; fi;
+ echo "Are these, in order, your username, password and pc-number?";
+ echo "username: ${USERNAME}";
+ echo "password: ${PAWD}";
+ echo "pc-number: ${PCNUMBER}";
+ # Ask whether settings are correct and act accordingly.
+ CHECK="Yes No";
+ select CHCKCHCK in ${CHECK}; do
+ if [ ${CHCKCHCK} = "Yes" ];
+ # Get username etc. again if last try was incorrect.
+ then adslconfigins;
+ # Else go to the next step.
+ else echo ""; echo ""; echo ""; a4lvarconfig;
+ fi
+ done
+}
+
+adslconfigins() {
+ # We want all users to be able to start the adsl connection.
+ insopts 655
+ insinto /etc/ppp/peers
+ # Save your settings in a file that can be called to start the connection in the future.
+ echo "idle 0" >> options.adsl
+ echo "noauth" >> options.adsl
+ echo "user ${USERNAME}" >> options.adsl
+ echo "usepeerdns" >> options.adsl
+ echo "defaultroute" >> options.adsl
+ echo "linkname mxstream" >> options.adsl
+ echo pty "/usr/sbin/pptp 10.0.0.138 --nolaunchpppd --phone" "${PCNUMBER}" >> options.adsl
+ newins options.adsl adsl
+ pap-secretsins;
+}
+
+pap-secretsins() {
+ insinto /etc/ppp
+ # Save the 'secret' (password) in the secrets file.
+ echo "# Secrets for authentication using PAP" >> pap-secrets
+ echo "# client server secret ip-addresses" >> pap-secrets
+ echo "${USERNAME} * "'"'"${PAWD}"'"'" *" >> pap-secrets
+ doins pap-secrets
+ einfo "Configuration is done!"
+ einfo "If you want you can check/tweak your settings by editting /etc/ppp/pap-secrets"
+ einfo "and /etc/ppp/peers/adsl. Enjoy!"
+ exit;
+}
+
+# Start the configuring
+a4lvarconfig;
+
+ # Crontab Logging
+ einfo "Trying to install logging..."
+ local TESTER="root test -x /usr/sbin/adsl && /usr/sbin/adsl update"
+ local TEST1="^/5 \* \* \* \* ${TESTER}"
+ local STRING1="^/5 * * * * ${TESTER}"
+ # If cron works install, else don't.
+ if [ "grep -c ${TEST1} /etc/crontab" != "0" ]; then einfo "Not adding string for crontab";
+ else echo -e '\n# 5-minute ADSL log update' >> /etc/crontab;
+ echo -e "${STRING1}" >> /etc/crontab;
+ einfo "Added to crontab: a 5 minute log update";
+ fi;
+
+ # ip-down.local logging
+ local TEST=""
+ local TEST2="^/usr/sbin/adsl stoplog$"
+ local STRING2="/usr/sbin/adsl stoplog"
+ if [ -e /etc/ppp/ip-down.local ]; then :; else touch /etc/ppp/ip-down.local; fi
+ local test=`grep -c ${TEST2} /etc/ppp/ip-down.local`
+ # If there already is such a string, don't do anything, else add it.
+ if [ ${TEST} != "0" ]; then einfo "Not adding string for log in /etc/ppp/ip-down.local";
+ else echo -e '\n# ADSL log save' >> /etc/ppp/ip-down.local;
+ echo -e "${STRING2}" >> /etc/ppp/ip-down.local;
+ einfo "Added to ip-down.local: log save";
+ fi;
+}