* Thu Mar 06 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-30.sme

-  systemd unit for ippp [SME: 12876]
-  systemd unit for wan [SME: 12875]
This commit is contained in:
2025-03-06 17:11:29 -05:00
parent a3f80cc6fa
commit 33833b4033
26 changed files with 170 additions and 42 deletions

View File

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

View File

@@ -1,58 +0,0 @@
#!/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

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

View File

@@ -9,4 +9,5 @@ then
fi
echo script run.$config not found - please report this as a bug
sleep 100
#sleep 100
exit 0

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,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

@@ -3,7 +3,8 @@
ISDN=$(/sbin/e-smith/config getprop isdn status)
if [ "$ISDN" = "enabled" ]
then
sv u /service/ippp
# Stop and then start. If the units are not running yet, they will be started.
/usr/bin/systemctl restart ippp
sleep 10
# TODO check here that ISDN device is available!!
fi

View File

@@ -0,0 +1,21 @@
#------------------------------------------------------------
# !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
/sbin/ifconfig eth1 up mtu 1500
/sbin/modprobe ppp_generic
/sbin/modprobe ppp_async
/sbin/modprobe ppp_synctty
DEVICE=eth1
# add pppoe module
/sbin/modprobe pppoe
PPPD_MLIMIT=100000000
# PPPOE_TIMEOUT should be about 4*LCP_INTERVAL
PPPOE_TIMEOUT=120