initial commit of file from CVS for e-smith-base on Thu 26 Oct 11:24:52 BST 2023

This commit is contained in:
2023-10-26 11:24:52 +01:00
parent bbc22988a8
commit 9510d1a360
678 changed files with 22721 additions and 2 deletions

View File

View File

@@ -0,0 +1,6 @@
#! /bin/sh
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/ippp

View File

58
root/var/service/ippp/run Normal file
View File

@@ -0,0 +1,58 @@
#!/bin/sh
#
# Based on /etc/rc.d/init.d/ippp:
#
# (C) Copyright 1995-1999 Mike Jagdis <jaggy@purplet.demon.co.uk>
#
# The assumption is that dialds are to be used to manage the ippp
# interfaces. If not the ippp interfaces should be reconfigured
# afterwards as necessary.
#
# This should run before dialds are started and before any attempt
# is made to reconfigure ippp interfaces differently.
config_file=./config
modprobe hisax
# TODO should check here for failure!!
# Try and load compression modules before doing
# anything that might load SLIP/PPP modules.
# (I don't know why Mike Jagdiss script does this
modprobe bsd_comp ppp_deflate
# Set up this interface for syncPPP over HDLC.
# Disable the hangup timeout because diald should be
# managing that.
isdnctrl delif ippp0
isdnctrl addif ippp0
isdnctrl encap ippp0 syncppp
isdnctrl l2_prot ippp0 hdlc
isdnctrl huptimeout ippp0 0
isdnctrl eaz ippp0 ""
isdnctrl status ippp0 on
# Explicitly bind the interface to the matching
# syncPPP manager channel. This is essential if
# any PPP options are specified. It is arguably
# convenient when no options are supplied and a
# single ipppd manages several links too.
isdnctrl pppbind ippp0 0
# This interface is notavailable for incoming
# connections.
isdnctrl secure ippp0 on
ifconfig ippp0 "$LocalIP" \
pointopoint 0.0.0.0 \
netmask 255.255.255.255 \
up
# Diald will add host routes as appropriate. If we
# let ipppd do it diald may never notice the link
# come up as a result of an incoming connection
# where all the traffic is to/from the local
# system. i.e. our reply must go out via the
# diald slip proxy.
exec ipppd ippp0 -detach -hostroute $pppopts

View File

View File

View File

@@ -0,0 +1,7 @@
#! /bin/sh
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/wan

View File

12
root/var/service/wan/run Normal file
View File

@@ -0,0 +1,12 @@
#! /bin/sh
exec 2>&1
config=$(/sbin/e-smith/config getprop ExternalInterface Configuration)
if [ -x run.$config ]
then
exec ./run.$config
fi
echo script run.$config not found - please report this as a bug
sleep 100

View File

@@ -0,0 +1,31 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 1999-2006 Mitel Networks Corporation
#
# 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#----------------------------------------------------------------------
exec 2>&1
. ./dhclient.config
configfile=/var/lib/dhclient/dhclient-$interface.conf
leasefile=/var/lib/dhclient/dhclient-$interface.leases
export PEERDNS=no
exec /sbin/dhclient -d \
-cf $configfile \
-lf $leasefile \
$interface

View File

@@ -0,0 +1,13 @@
#! /bin/sh
ISDN=$(/sbin/e-smith/config getprop isdn status)
if [ "$ISDN" = "enabled" ]
then
sv u /service/ippp
sleep 10
# TODO check here that ISDN device is available!!
fi
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 2 > /proc/sys/net/ipv4/ip_dynaddr
# echo 7 > /proc/sys/net/ipv4/ip_dynaddr
exec /usr/sbin/diald -daemon

View File

@@ -0,0 +1,4 @@
#! /bin/sh
echo run.disabled run - please report this as a bug
sleep 120

View File

@@ -0,0 +1,32 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 2002 Mitel Networks Corporation
#
# 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 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Technical support for this program is available from Mitel Networks
# Please visit our web site www.mitel.com/sme/ for details.
#----------------------------------------------------------------------
exec 2>&1
. ./run.pppoe.conf
extaddr=$(/sbin/e-smith/config getprop ExternalInterface IPAddress)
exec \
/usr/local/bin/softlimit -m $PPPD_MLIMIT \
/usr/bin/setsid \
/usr/sbin/pppd ${extaddr:+$extaddr:} \
file pppoe.pppd.conf

View File

@@ -0,0 +1,10 @@
#! /usr/bin/perl
use warnings;
use strict;
use esmith::ConfigDB;
use POSIX;
my $db = esmith::ConfigDB->open_ro;
system("/sbin/ifup", $db->get_prop('ExternalInterface', 'Name'));
pause();

View File