wok-tiny rev 17
Add ppp
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 02 22:04:13 2011 +0100 (2011-02-02) |
parents | 8ac92f6cb7ae |
children | 3ded08f4c708 |
files | ppp-plugins-atm/receipt ppp/receipt ppp/stuff/etc/init.d/pppd ppp/stuff/etc/ppp/README.scripts pppdump/receipt pppstats/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ppp-plugins-atm/receipt Wed Feb 02 22:04:13 2011 +0100 1.3 @@ -0,0 +1,73 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="ppp-plugins-atm" 1.7 +VERSION="2.4.5" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="ppp extras ADSL using pppoatm" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://ppp.samba.org/" 1.12 +DEPENDS="ppp" 1.13 +WANTED="ppp" 1.14 +CONFIG_FILES="/etc/ppp/" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + mkdir -p $fs/usr/lib/pppd/$VERSION 1.20 + cp -a $_pkg/usr/lib/pppd/$VERSION/pppoatm.so $fs/usr/lib/pppd/$VERSION 1.21 +} 1.22 + 1.23 +config_form() 1.24 +{ 1.25 + [ -n "$OPTIONS" -a "$OPTIONS" != "lock" ] || OPTIONS="lock 1.26 +plugin pppoatm.so 8.35 1.27 +name provider-ID 1.28 +noipdefault 1.29 +usepeerdns 1.30 +defaultroute 1.31 +persist 1.32 +noauth 1.33 + 1.34 +" 1.35 + cat <<EOT 1.36 +<table> 1.37 +<tr> 1.38 +<td>Options</td> 1.39 +<td><textarea name="OPTIONS" cols="60" wrap="off"> 1.40 +$OPTIONS 1.41 +</textarea></td> 1.42 +</tr> 1.43 +<tr> 1.44 +<td></td><td><pre>$(cat $1/etc/ppp/chap-secrets)</pre></td> 1.45 +</tr> 1.46 +<tr> 1.47 +<td>chap-secrets</td> 1.48 +<td><textarea name="CHAPSECRETS" cols="60" wrap="off"> 1.49 +$CHAPSECRETS 1.50 +</textarea></td> 1.51 +</tr> 1.52 +<tr> 1.53 +<td></td><td><pre>$(cat $1/etc/ppp/pap-secrets)</pre></td> 1.54 +</tr> 1.55 +<tr> 1.56 +<td>pap-secrets</td> 1.57 +<td><textarea name="PAPSECRETS" cols="60" wrap="off"> 1.58 +$PAPSECRETS 1.59 +</textarea></td> 1.60 +</tr> 1.61 +</table> 1.62 +EOT 1.63 +} 1.64 + 1.65 +post_install() 1.66 +{ 1.67 + dos2unix > $1/etc/ppp/options <<EOT 1.68 +$OPTIONS 1.69 +EOT 1.70 + dos2unix >> $1/etc/ppp/pap-secrets <<EOT 1.71 +$PAPSECRETS 1.72 +EOT 1.73 + dos2unix >> $1/etc/ppp/chap-secrets <<EOT 1.74 +$CHAPSECRETS 1.75 +EOT 1.76 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/ppp/receipt Wed Feb 02 22:04:13 2011 +0100 2.3 @@ -0,0 +1,152 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="ppp" 2.7 +VERSION="2.4.5" 2.8 +CATEGORY="tiny-slitaz" 2.9 +SHORT_DESC="Point to Point Protocol (Internet with RTC modems)" 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.12 +WEB_SITE="http://ppp.samba.org/" 2.13 +WGET_URL="ftp://ftp.samba.org/pub/ppp/$TARBALL" 2.14 +[ -n "$TARGET" ] || TARGET="i486" 2.15 +BUILD_DEPENDS="uclibc-cross-compiler-$TARGET" 2.16 +DEPENDS="libdl libgcc_s" 2.17 +CONFIG_FILES="/etc/ppp/" 2.18 + 2.19 +# Rules to configure and make the package. 2.20 +compile_rules() 2.21 +{ 2.22 + cd $src 2.23 + ./configure --prefix=/usr --mandir=/usr/share/man \ 2.24 + $CONFIGURE_ARGS && 2.25 + make CC=uclibc-$TARGET-cc && 2.26 + make DESTDIR=$PWD/_pkg/usr install 2.27 +} 2.28 + 2.29 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.30 +genpkg_rules() 2.31 +{ 2.32 + mkdir -p $fs/etc/ppp/peers $fs/etc/ppp/scripts $fs/usr/sbin 2.33 + cp -a $_pkg/usr/sbin/pppd $fs/usr/sbin 2.34 + cp -a $src/scripts/ip-up.local.add $fs/etc/ppp/ip-up 2.35 + cp -a $src/scripts/ip-down.local.add $fs/etc/ppp/ip-down 2.36 + cp -a stuff/* $fs 2.37 + cp -a $src/scripts/ppp-on $fs/etc/ppp/scripts 2.38 + cp -a $src/scripts/ppp-on-dialer $fs/etc/ppp/scripts 2.39 + cp -a $src/scripts/ppp-off $fs/etc/ppp/scripts 2.40 + cp -a $src/scripts/callback $fs/etc/ppp/scripts 2.41 + cp -a $src/scripts/redialer $fs/etc/ppp/scripts 2.42 + cp -a $src/etc.ppp/* $fs/etc/ppp 2.43 + chmod +x $fs/etc/ppp/ip* 2.44 + # insert #!/bin/sh on top line in ip* scripts 2.45 + sed -i '1i\#!/bin/sh' $fs/etc/ppp/ip* 2.46 + # add empty peers dir 2.47 + sed -i 's:ppp/ppp-on-dialer:ppp/scripts/ppp-on-dialer:' \ 2.48 + $fs/etc/ppp/scripts/ppp-on 2.49 + 2.50 +#sed: taz/ppp-2.4.5/fs/etc/ppp/scripts/ppp-on: Not a directory 2.51 + 2.52 + 2.53 +} 2.54 + 2.55 +config_form() 2.56 +{ 2.57 + [ -n "$OPTIONS" ] || OPTIONS="lock" 2.58 + [ -n "$LOCAL_IP" ] || LOCAL_IP="0.0.0.0" 2.59 + [ -n "$REMOTE_IP" ] || REMOTE_IP="0.0.0.0" 2.60 + [ -n "$NETMASK" ] || NETMASK="255.255.255.0" 2.61 + cat <<EOT 2.62 +<pre> 2.63 +$(cat $1/etc/ppp/README.scripts) 2.64 +</pre> 2.65 +<table> 2.66 +<tr> 2.67 +<td>Telephone number</td> 2.68 +<td><input type="text" name="TELEPHONE" value="$TELEPHONE" /></td> 2.69 +</tr> 2.70 +<tr> 2.71 +<td>Account name</td> 2.72 +<td><input type="text" name="ACCOUNT" value="$ACCOUNT" /></td> 2.73 +</tr> 2.74 +<tr> 2.75 +<td>Account password</td> 2.76 +<td><input type="text" name="PASSWORD" value="$PASSWORD" /></td> 2.77 +</tr> 2.78 +<tr> 2.79 +<td>callback password</td> 2.80 +<td><input type="text" name="MODEMPASS" value="$MODEMPASS" /></td> 2.81 +</tr> 2.82 +<tr> 2.83 +<td>Options</td> 2.84 +<td><textarea name="OPTIONS" cols="60" wrap="off"> 2.85 +$OPTIONS 2.86 +</textarea></td> 2.87 +</tr> 2.88 +<tr> 2.89 +<td></td><td><pre>$(cat $1/etc/ppp/chap-secrets)</pre></td> 2.90 +</tr> 2.91 +<tr> 2.92 +<td>chap-secrets</td> 2.93 +<td><textarea name="CHAPSECRETS" cols="60" wrap="off"> 2.94 +$CHAPSECRETS 2.95 +</textarea></td> 2.96 +</tr> 2.97 +<tr> 2.98 +<td></td><td><pre>$(cat $1/etc/ppp/pap-secrets)</pre></td> 2.99 +</tr> 2.100 +<tr> 2.101 +<td>pap-secrets</td> 2.102 +<td><textarea name="PAPSECRETS" cols="60" wrap="off"> 2.103 +$PAPSECRETS 2.104 +</textarea></td> 2.105 +</tr> 2.106 +<tr> 2.107 +<td>Connection script</td> 2.108 +<td><select name="DIALER_SCRIPT"> 2.109 + <option value="/etc/ppp/ppp-on-dialer">/etc/ppp/ppp-on-dialer</option> 2.110 + <option value="/etc/ppp/scripts/callback"$([ "$DIALER_SCRIPT" == "/etc/ppp/scripts/callback" ] && 2.111 + echo ' selected="selected"')>/etc/ppp/scripts/callback</option> 2.112 +</select></td> 2.113 +</tr> 2.114 +<tr> 2.115 +<td>local ip</td> 2.116 +<td><input type="text" name="LOCAL_IP" value="$LOCAL_IP" /></td> 2.117 +</tr> 2.118 +<tr> 2.119 +<td>remote ip</td> 2.120 +<td><input type="text" name="REMOTE_IP" value="$REMOTE_IP" /></td> 2.121 +</tr> 2.122 +<tr> 2.123 +<td>netmask</td> 2.124 +<td><input type="text" name="NETMASK" value="$NETMASK" /></td> 2.125 +</tr> 2.126 +</table> 2.127 +EOT 2.128 +} 2.129 + 2.130 +post_install() 2.131 +{ 2.132 + rm -f $1/etc/ppp/README.scripts 2.133 + cat > $1/etc/ppp/options <<EOT 2.134 +$OPTIONS 2.135 +EOT 2.136 + cat >> $1/etc/ppp/pap-secrets <<EOT 2.137 +$PAPSECRETS 2.138 +EOT 2.139 + cat >> $1/etc/ppp/chap-secrets <<EOT 2.140 +$CHAPSECRETS 2.141 +EOT 2.142 + sed -i -e "s/^TELEPHONE=.*/TELEPHONE=\"$TELEPHONE\"/" \ 2.143 + -e "s/^ACCOUNT=.*/ACCOUNT=\"$ACCOUNT\"/" \ 2.144 + -e "s/^PASSWORD=.*/PASSWORD=\"$PASSWORD\"/" \ 2.145 + -e "s/^LOCAL_IP=.*/LOCAL_IP=\"$LOCAL_IP\"/" \ 2.146 + -e "s/^REMOTE_IP=.*/REMOTE_IP=\"$REMOTE_IP\"/" \ 2.147 + -e "s/^NETMASK=.*/NETMASK=\"$NETMASK\"/" \ 2.148 + -e "s/^DIALER_SCRIPT=.*/DIALER_SCRIPT=\"$DIALER_SCRIPT\"/" \ 2.149 + $1/etc/ppp/scripts/ppp-on 2.150 + sed -i -e "s/^PHONE=.*/PHONE=\"$TELEPHONE\"/" \ 2.151 + -e "s/^PASSWORD=.*/PASSWORD=\"$PASSWORD\"/" \ 2.152 + -e "s/^ACCOUNT=.*/ACCOUNT=\"$ACCOUNT\"/" \ 2.153 + -e "s/^MODEMPASS=.*/MODEMPASS=\"$MODEMPASS\"/" \ 2.154 + $1/etc/ppp/scripts/callback 2.155 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/ppp/stuff/etc/init.d/pppd Wed Feb 02 22:04:13 2011 +0100 3.3 @@ -0,0 +1,12 @@ 3.4 +#!/bin/sh 3.5 + 3.6 +case "$1" in 3.7 +start) 3.8 + echo 1 > /proc/sys/net/ipv4/ip_forward 3.9 + exec /etc/ppp/scripts/ppp-on ;; 3.10 +stop) 3.11 + exec /etc/ppp/scripts/ppp-off ;; 3.12 +restart) 3.13 + $0 stop 3.14 + $0 start ;; 3.15 +esac
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/ppp/stuff/etc/ppp/README.scripts Wed Feb 02 22:04:13 2011 +0100 4.3 @@ -0,0 +1,67 @@ 4.4 +README.scripts - PPP scripts documentation for SliTaz GNU/Linux 2007 4.5 +=============================================================================== 4.6 + 4.7 + 4.8 +This README.scripts file is based on the documentation found in the ppp source 4.9 +package (version 2.4.4). The files in the scripts/ directory were contributed 4.10 +by Al Longyear (longyear@netcom.com) and Adi Masputra (adi.masputra@sun.com). 4.11 +This file was modified for SliTaz by Christophe Lincoln (pankso@slitaz.org). 4.12 + 4.13 + 4.14 +ppp-on 4.15 +------ 4.16 +This script will initiate a connection to the PPP system. It will run 4.17 +the chat program with the connection script as a parameter. This is a 4.18 +possible security hole. However, it is simple. It is meant to replace 4.19 +the previous version of ppp-on which was not very functional. 4.20 + 4.21 +The ppp-on script has entries for the account name, password, IP 4.22 +addresses, and telephone numbers. The parameters are passed to the 4.23 +pppd process and, then in turn, to the second part of the connect 4.24 +script, as a set of environment variables. 4.25 + 4.26 +Please make sure that you put the full path name to the ppp-on-dialer 4.27 +script in the reference to it in ppp-on. 4.28 + 4.29 + 4.30 +ppp-on-dialer 4.31 +------------- 4.32 +This is the second part to the simple calling script, ppp-on. It 4.33 +executes the chat program to connect the user with a standard UNIX 4.34 +style getty/login connection sequence. 4.35 + 4.36 + 4.37 +callback 4.38 +-------- 4.39 +This script may be used in lieu of the ppp-on-dialer to permit the 4.40 +common modem callback sequence. You may need to make changes to the 4.41 +expected prompt string for the modem. 4.42 + 4.43 +The script works by disabling the system's detection of the DCD 4.44 +condition and working on the modem status message "NO CARRIER" which 4.45 +is generated when the modem disconnects. 4.46 + 4.47 +It is crude. It does work for my modem connection. Use as you see fit. 4.48 + 4.49 + 4.50 +redialer 4.51 +-------- 4.52 +The redialer script is a replacement for the ppp-on-dialer script. It 4.53 +will do 'attack dialing' or 'demon dialing' of one or more telephone 4.54 +numbers. The first number which responds will be used for a 4.55 +connection. 4.56 + 4.57 +There is a limit of ten attempts and a 15 second delay between dialing 4.58 +attempts. Both values are set in the script. 4.59 + 4.60 + 4.61 +ppp-off 4.62 +------- 4.63 +This is a script which will terminate the active ppp connection. Use 4.64 +as either "ppp-off" to terminate ppp0, or "ppp-off <device>" to 4.65 +terminate the connection on <device>. For example, "ppp-off ppp2" will 4.66 +terminate the ppp2 connection. 4.67 + 4.68 + 4.69 +=============================================================================== 4.70 +http://ppp.samba.org/ http://www.slitaz.org/
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/pppdump/receipt Wed Feb 02 22:04:13 2011 +0100 5.3 @@ -0,0 +1,18 @@ 5.4 +# SliTaz package receipt. 5.5 + 5.6 +PACKAGE="pppdump" 5.7 +VERSION="2.4.5" 5.8 +CATEGORY="network" 5.9 +SHORT_DESC="Point to Point Protocol debug tool" 5.10 +MAINTAINER="pascal.bellard@slitaz.org" 5.11 +WEB_SITE="http://ppp.samba.org/" 5.12 +DEPENDS="ppp" 5.13 +WANTED="ppp" 5.14 + 5.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 5.16 +genpkg_rules() 5.17 +{ 5.18 + mkdir -p $fs/usr/sbin 5.19 + cp -a $_pkg/usr/sbin/pppdump $fs/usr/sbin 5.20 +} 5.21 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/pppstats/receipt Wed Feb 02 22:04:13 2011 +0100 6.3 @@ -0,0 +1,17 @@ 6.4 +# SliTaz package receipt. 6.5 + 6.6 +PACKAGE="pppstats" 6.7 +VERSION="2.4.5" 6.8 +CATEGORY="network" 6.9 +SHORT_DESC="Point to Point Protocol report tool" 6.10 +MAINTAINER="pascal.bellard@slitaz.org" 6.11 +WEB_SITE="http://ppp.samba.org/" 6.12 +DEPENDS="ppp" 6.13 +WANTED="ppp" 6.14 + 6.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 6.16 +genpkg_rules() 6.17 +{ 6.18 + mkdir -p $fs/usr/sbin 6.19 + cp -a $_pkg/usr/sbin/pppstats $fs/usr/sbin 6.20 +}