mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
adding new package 'ppp' - many thanks to kaixinbird
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
eaa3c90c48
commit
bd72888008
@ -31,6 +31,19 @@ if [ "$DEVTOOLS" = yes ]; then
|
||||
echo "CONFIG_FONTS=n" >> $LINUX/.config
|
||||
fi
|
||||
|
||||
if [ "$PPP_DAEMON" = yes ]; then
|
||||
echo "CONFIG_PPP=m" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_MULTILINK=n" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_FILTER=n" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_ASYNC=m" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_SYNC_TTY=m" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_DEFLATE=n" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_BSDCOMP=n" >> $LINUX/.config
|
||||
echo "CONFIG_PPP_MPPE=n" >> $LINUX/.config
|
||||
echo "CONFIG_PPPOE=y" >> $LINUX/.config
|
||||
echo "CONFIG_PPPOL2TP=n" >> $LINUX/.config
|
||||
fi
|
||||
|
||||
# copy some extra firmware to linux tree
|
||||
cp -R $PKG_DIR/firmware/* $LINUX/firmware
|
||||
|
||||
|
@ -7,3 +7,5 @@ $SCRIPTS/install dropbear
|
||||
#$SCRIPTS/install wicd
|
||||
$SCRIPTS/install wireless_tools
|
||||
$SCRIPTS/install wpa_supplicant
|
||||
|
||||
[ "$PPP_DAEMON" = yes ] && $SCRIPTS/install ppp
|
||||
|
14
packages/network/ppp/build
Executable file
14
packages/network/ppp/build
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
./configure
|
||||
|
||||
sed -i "s/^FILTER=y/#FILTER=y/" pppd/Makefile
|
||||
|
||||
make CC="$TARGET_CC" COPTS="$TARGET_CFLAGS"
|
||||
|
21
packages/network/ppp/config/adsl.sample
Normal file
21
packages/network/ppp/config/adsl.sample
Normal file
@ -0,0 +1,21 @@
|
||||
plugin /etc/ppp/plugins/rp-pppoe.so
|
||||
# Ethernet interface name
|
||||
eth0
|
||||
# Your username at the ISP
|
||||
#user ""
|
||||
|
||||
# What should be in the second column in /etc/ppp/*-secrets
|
||||
remotename "chap"
|
||||
# If needed, specify the service and the access concentrator name
|
||||
# rp_pppoe_service "internet"
|
||||
# rp_pppoe_ac "ac1"
|
||||
|
||||
# The settings below usually don't need to be changed
|
||||
noauth
|
||||
hide-password
|
||||
updetach
|
||||
debug
|
||||
defaultroute
|
||||
noipdefault
|
||||
usepeerdns
|
||||
|
53
packages/network/ppp/init.d/44_adsl
Executable file
53
packages/network/ppp/init.d/44_adsl
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||
# http://www.openelec.tv
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
# start pppoe connection
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
. /etc/profile
|
||||
|
||||
progress "Starting pppoe connection"
|
||||
|
||||
|
||||
ifconfig eth0 up
|
||||
echo "nameserver 8.8.8.8" >> /var/cache/resolv.conf
|
||||
echo "nameserver 8.8.4.4" >> /var/cache/resolv.conf
|
||||
|
||||
cp /etc/ppp/chap-secrets.sample /storage/.config/
|
||||
cp /etc/ppp/pap-secrets.sample /storage/.config/
|
||||
cp /etc/ppp/peers/adsl.sample /storage/.config/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cp /storage/.config/chap-secrets /var/cache
|
||||
cp /storage/.config/pap-secrets /var/cache
|
||||
cp /storage/.config/adsl /var/cache
|
||||
|
||||
modprobe ppp_generic
|
||||
modprobe ppp_async
|
||||
modprobe pppoe
|
||||
pppd call adsl
|
||||
|
||||
sleep 5
|
39
packages/network/ppp/install
Executable file
39
packages/network/ppp/install
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
|
||||
mkdir -p $INSTALL/etc/ppp
|
||||
cp $PKG_BUILD/etc.ppp/chap-secrets $INSTALL/etc/ppp/chap-secrets.sample
|
||||
cp $PKG_BUILD/etc.ppp/pap-secrets $INSTALL/etc/ppp/pap-secrets.sample
|
||||
|
||||
# /etc/ppp/chap-secrets and /etc/ppp/pap-secets must be writeable
|
||||
ln -sf /var/cache/chap-secrets $INSTALL/etc/ppp/chap-secrets
|
||||
ln -sf /var/cache/pap-secrets $INSTALL/etc/ppp/pap-secrets
|
||||
|
||||
#/etc/ppp/peers/adsl must be writeable
|
||||
ln -sf /var/cache/adsl $INSTALL/etc/ppp/peers/adsl
|
||||
|
||||
mkdir -p $INSTALL/etc/ppp/peers
|
||||
cp $PKG_DIR/config/adsl.sample $INSTALL/etc/ppp/peers/
|
||||
|
||||
mkdir -p $INSTALL/etc/ppp/plugins
|
||||
cp $PKG_BUILD/pppd/plugins/rp-pppoe/rp-pppoe.so $INSTALL/etc/ppp/plugins
|
||||
|
||||
mkdir -p $INSTALL/usr/sbin
|
||||
cp $PKG_DIR/scripts/pppoe-setup $INSTALL/usr/sbin
|
||||
|
||||
cp $PKG_BUILD/scripts/ppp-on $INSTALL/usr/sbin/pon
|
||||
cp $PKG_BUILD/scripts/ppp-off $INSTALL/usr/sbin/poff
|
||||
cp $PKG_BUILD/scripts/ppp-on-dialer $INSTALL/usr/sbin
|
||||
cp $PKG_BUILD/scripts/plog $INSTALL/usr/sbin
|
||||
cp $PKG_BUILD/chat/chat $INSTALL/usr/sbin
|
||||
cp $PKG_BUILD/pppd/pppd $INSTALL/usr/sbin
|
||||
cp $PKG_BUILD/pppd/plugins/rp-pppoe/pppoe-discovery $INSTALL/usr/sbin/
|
||||
cp $PKG_BUILD/pppdump/pppdump $INSTALL/usr/sbin
|
||||
cp $PKG_BUILD/pppstats/pppstats $INSTALL/usr/sbin
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/pppd/2.4.5
|
||||
cp $PKG_BUILD/pppd/plugins/*.so $INSTALL/usr/lib/pppd/2.4.5
|
||||
|
52
packages/network/ppp/scripts/pppoe-setup
Executable file
52
packages/network/ppp/scripts/pppoe-setup
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Adsl configure........."
|
||||
|
||||
while [ true ] ; do
|
||||
echo ""
|
||||
echo "USER NAME"
|
||||
echo ""
|
||||
printf "%s" ">>> Enter your PPPoE user name (default $user): "
|
||||
read Uu
|
||||
|
||||
if [ "$Uu" = "" ] ; then
|
||||
Uu="$user"
|
||||
fi
|
||||
|
||||
U=`echo $Uu | sed -e "s/&/\\\\\&/g"`
|
||||
|
||||
while [ true ] ; do
|
||||
echo ""
|
||||
echo "PASSWORD"
|
||||
echo ""
|
||||
|
||||
printf "%s" ">>> Please enter your PPPoE password: "
|
||||
read PWD1
|
||||
echo ""
|
||||
printf "%s" ">>> Please re-enter your PPPoE password: "
|
||||
read PWD2
|
||||
echo ""
|
||||
|
||||
if [ "$PWD1" = "$PWD2" ] ; then
|
||||
break
|
||||
fi
|
||||
|
||||
printf "%s" ">>> Sorry, the passwords do not match. Try again? (y/n)"
|
||||
read ANS
|
||||
case "$ANS" in
|
||||
N|No|NO|Non|n|no|non)
|
||||
echo "OK, quitting. Bye."
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
|
||||
echo "\"$Uu\" * \"$PWD1\"" > /storage/.config/chap-secrets
|
||||
cp /storage/.config/chap-secrets /var/cache/
|
||||
|
||||
echo "\"$Uu\" * \"$PWD1\"" > /storage/.config/pap-secrets
|
||||
cp /storage/.config/pap-secrets /var/cache/
|
||||
exit 0
|
||||
done
|
||||
|
1
packages/network/ppp/url
Normal file
1
packages/network/ppp/url
Normal file
@ -0,0 +1 @@
|
||||
http://ppp.samba.org/ftp/ppp/ppp-2.4.5.tar.gz
|
@ -80,6 +80,9 @@
|
||||
# build with network support (yes / no)
|
||||
NETWORK="yes"
|
||||
|
||||
# build ppp daemon (for configuring adsl etc...) (yes / no)
|
||||
PPP_DAEMON="no"
|
||||
|
||||
# build and install with XBMC webfrontend (yes / no)
|
||||
WEBSERVER="yes"
|
||||
|
||||
|
@ -80,6 +80,9 @@
|
||||
# build with network support (yes / no)
|
||||
NETWORK="yes"
|
||||
|
||||
# build ppp daemon (for configuring adsl etc...) (yes / no)
|
||||
PPP_DAEMON="no"
|
||||
|
||||
# build and install with XBMC webfrontend (yes / no)
|
||||
WEBSERVER="yes"
|
||||
|
||||
|
@ -80,6 +80,9 @@
|
||||
# build with network support (yes / no)
|
||||
NETWORK="yes"
|
||||
|
||||
# build ppp daemon (for configuring adsl etc...) (yes / no)
|
||||
PPP_DAEMON="no"
|
||||
|
||||
# build and install with XBMC webfrontend (yes / no)
|
||||
WEBSERVER="yes"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user