Accepting request 1238098 from network
- Fixed status script pppoe-status and systemd unit file. OBS-URL: https://build.opensuse.org/request/show/1238098 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rp-pppoe?expand=0&rev=33
This commit is contained in:
commit
155ce115ae
@ -478,7 +478,7 @@ $ECHO "Congratulations, it should be all set up!"
|
||||
$ECHO ""
|
||||
$ECHO "Type '/usr/sbin/ifup $dsl_device' to bring up your xDSL link and '/sbin/ifdown $dsl_device'"
|
||||
$ECHO "to bring it down."
|
||||
$ECHO "Type '/usr/sbin/pppoe-status $NETWORKDIR/ifcfg-$dsl_device'"
|
||||
$ECHO "Type '/usr/sbin/pppoe-status'"
|
||||
$ECHO "to see the link status."
|
||||
$ECHO ""
|
||||
|
||||
|
@ -189,7 +189,7 @@ fi
|
||||
# Monitor connection
|
||||
TIME=0
|
||||
while [ true ] ; do
|
||||
$STATUS $CONFIG > /dev/null 2>&1
|
||||
$STATUS &>/dev/null
|
||||
|
||||
# Looks like the interface came up
|
||||
if [ $? = 0 ] ; then
|
||||
|
105
pppoe-status
105
pppoe-status
@ -1,105 +1,22 @@
|
||||
#!/bin/bash
|
||||
#***********************************************************************
|
||||
#
|
||||
# pppoe-status
|
||||
#
|
||||
# Shell script to report on status of PPPoE connection
|
||||
#
|
||||
# Copyright (C) 2000-2001 Roaring Penguin Software Inc.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU General
|
||||
# Public License.
|
||||
#
|
||||
# LIC: GPL
|
||||
#
|
||||
# Usage: pppoe-status [config_file]
|
||||
# If config_file is omitted, defaults to /etc/ppp/pppoe.conf
|
||||
#
|
||||
#***********************************************************************
|
||||
#!/bin/sh
|
||||
|
||||
# Defaults
|
||||
LS=/usr/bin/ls
|
||||
IP=/usr/sbin/ip
|
||||
NETWORKDIR=/etc/sysconfig/network
|
||||
|
||||
get_device() {
|
||||
if [ ! -d $NETWORKDIR ] ; then
|
||||
$ECHO "** $NETWORKDIR not found"
|
||||
$ECHO "** Quitting"
|
||||
exit 1
|
||||
for i in /run/ppp/??*.pid ; do
|
||||
if [ -r "$i" ] && [ `wc -l < "$i"` -eq 2 ] ; then
|
||||
PID=`head -n 1 "$i"`
|
||||
IF=`sed -n '2p' "$i"`
|
||||
if [ -z "$PID" ] || [ -z "$IF" ] || ! ps -p "$PID" &>/dev/null; then
|
||||
echo "pppoe-status: Process $PID for interface $IF does not exist"
|
||||
continue
|
||||
fi
|
||||
|
||||
cd $NETWORKDIR
|
||||
interfaces=$($LS ifcfg-ppp* 2>/dev/null | grep -E -v '(~|\.bak)$' | \
|
||||
grep -E -v '(rpmsave|rpmorig|rpmnew)' | sed 's/^ifcfg-//g')
|
||||
|
||||
for i in $interfaces ; do
|
||||
test -f ifcfg-$i && . ifcfg-$i 2>/dev/null
|
||||
if [ "$TYPE" = "xDSL" ] ; then
|
||||
CONFIG=$NETWORKDIR/ifcfg-$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
CONFIG="$1"
|
||||
if [ -z "$CONFIG" ] ; then
|
||||
get_device
|
||||
[ -z "$CONFIG" ] && CONFIG=/etc/ppp/pppoe.conf
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
|
||||
echo "$0: Cannot read configuration file '$CONFIG'" >& 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. $CONFIG
|
||||
|
||||
PPPOE_PIDFILE="$PIDFILE.pppoe"
|
||||
PPPD_PIDFILE="$PIDFILE.pppd"
|
||||
|
||||
if [ "$DEMAND" != "no" ] ; then
|
||||
echo "Note: You have enabled demand-connection; pppoe-status may be inaccurate."
|
||||
fi
|
||||
|
||||
# If no PPPOE_PIDFILE, connection is down, unless we're using the Linux plugin
|
||||
if [ "$LINUX_PLUGIN" = "" ] ; then
|
||||
if [ ! -r "$PPPOE_PIDFILE" ] ; then
|
||||
echo "pppoe-status: Link is down (can't read pppoe PID file $PPPOE_PIDFILE)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# If no PPPD_PIDFILE, something fishy!
|
||||
if [ ! -r "$PPPD_PIDFILE" ] ; then
|
||||
echo "pppoe-status: Link is down (can't read pppd PID file $PPPD_PIDFILE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PPPD_PID=`cat "$PPPD_PIDFILE"`
|
||||
|
||||
# Sigh. Some versions of pppd put PID files in /run; others put them
|
||||
# in /etc/ppp. Since it's too messy to figure out what pppd does, we
|
||||
# try both locations.
|
||||
for i in /etc/ppp/ppp*.pid /run/ppp*.pid ; do
|
||||
if [ -r $i ] ; then
|
||||
PID=`cat $i`
|
||||
if [ "$PID" = "$PPPD_PID" ] ; then
|
||||
IF=`basename $i .pid`
|
||||
$IP route | grep "dev ${IF}\s" > /dev/null
|
||||
if [ "$?" != "0" ] ; then
|
||||
if ! ip route | grep -qw "dev $IF"; then
|
||||
echo "pppoe-status: Link is attached to $IF, but $IF is down"
|
||||
exit 1
|
||||
fi
|
||||
echo "pppoe-status: Link is up and running on interface $IF"
|
||||
$IP addr show $IF
|
||||
ip addr show "$IF"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo "ppppoe-status: Link is down -- could not find interface corresponding to"
|
||||
echo "pppd pid $PPPD_PID"
|
||||
echo "ppppoe-status: Link is down"
|
||||
exit 1
|
||||
|
@ -6,7 +6,7 @@ After=network.target
|
||||
Group=dialout
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
ExecStart=/usr/sbin/pppoe-start
|
||||
ExecStart=-/usr/sbin/pppoe-start
|
||||
ExecStop=/usr/sbin/pppoe-stop
|
||||
|
||||
[Install]
|
||||
|
@ -1,5 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 4 17:34:28 UTC 2024 - Илья Индиго <ilya@ilya.cf>
|
||||
Wed Jan 15 16:47:01 UTC 2025 - Илья Индиго <ilya@ilya.top>
|
||||
|
||||
- Fixed status script pppoe-status and systemd unit file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 4 17:34:28 UTC 2024 - Илья Индиго <ilya@ilya.top>
|
||||
|
||||
- Removed rcpppoe and rcpppoe-server rudiments.
|
||||
|
||||
@ -53,12 +58,12 @@ Sun Sep 4 17:53:20 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
- Converted usage of egrep to "grep -E" (boo#1203092).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 10 13:47:22 UTC 2022 - Илья Индиго <ilya@ilya.cf>
|
||||
Thu Mar 10 13:47:22 UTC 2022 - Илья Индиго <ilya@ilya.top>
|
||||
|
||||
- Removed Wants=network.target from pppoe.service (bsc#1196359).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 8 20:24:02 UTC 2021 - Илья Индиго <ilya@ilya.cf>
|
||||
Sat May 8 20:24:02 UTC 2021 - Илья Индиго <ilya@ilya.top>
|
||||
|
||||
- Refreshed spec-file via spec-cleaner and manual optimisations.
|
||||
* Changed files: pppoe-connect, pppoe-setup, pppoe-status and
|
||||
@ -69,7 +74,7 @@ Sat May 8 20:24:02 UTC 2021 - Илья Индиго <ilya@ilya.cf>
|
||||
* Switch from net-tools to iproute2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 28 01:11:10 UTC 2020 - Илья Индиго <ilya@ilya.cf>
|
||||
Thu May 28 01:11:10 UTC 2020 - Илья Индиго <ilya@ilya.top>
|
||||
|
||||
- Refresh spec-file via spec-cleaner and manual optimisations.
|
||||
* Add make_build and autopatch macros.
|
||||
@ -88,7 +93,7 @@ Thu May 28 01:11:10 UTC 2020 - Илья Индиго <ilya@ilya.cf>
|
||||
* Change VERSION macro to RP_VERSION to avoid conflict with pppd macro.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 17 07:50:57 UTC 2019 - Илья Индиго <ilya@ilya.cf>
|
||||
Mon Jun 17 07:50:57 UTC 2019 - Илья Индиго <ilya@ilya.top>
|
||||
|
||||
- Refresh spec-file via spec-cleaner and manual optimisations.
|
||||
* New URL and Source project.
|
||||
@ -104,38 +109,38 @@ Wed Jun 12 14:56:41 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
shortcut the build queues by allowing usage of systemd-mini
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 10 02:40:34 UTC 2018 - ilya@ilya.cf
|
||||
Sat Mar 10 02:40:34 UTC 2018 - ilya@ilya.top
|
||||
|
||||
- Refresh spec-file via spec-cleaner and manual optimisations.
|
||||
- Add %license macro.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 23 14:06:28 UTC 2017 - ilya@ilya.cf
|
||||
Thu Nov 23 14:06:28 UTC 2017 - ilya@ilya.top
|
||||
|
||||
- Add Requires/Requires(pre) group(dialout) (boo#1067511).
|
||||
- Add %verify_permissions script for pppoe-wrapper.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 9 12:53:45 UTC 2017 - ilya@ilya.cf
|
||||
Thu Nov 9 12:53:45 UTC 2017 - ilya@ilya.top
|
||||
|
||||
- Refresh pppoe.spec via spec-cleaner.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 8 12:26:27 UTC 2017 - ilya@ilya.cf
|
||||
Sun Oct 8 12:26:27 UTC 2017 - ilya@ilya.top
|
||||
|
||||
- Add pppoe.service for run pppoe as client (boo#1060710).
|
||||
- Refresh pppoe.spec.
|
||||
- Drop SLE 11 support.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 16 15:51:48 UTC 2016 - ilya@ilya.cf
|
||||
Wed Nov 16 15:51:48 UTC 2016 - ilya@ilya.top
|
||||
|
||||
- Fix patches and script for version 3.12.
|
||||
- dropped logger-path.diff
|
||||
- Add net-tools support. net-tools-deprecated is no longer required.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 25 22:23:41 EEST 2016 - ilya@ilya.cf
|
||||
Tue Oct 25 22:23:41 EEST 2016 - ilya@ilya.top
|
||||
|
||||
- Update to version 3.12.
|
||||
- Fix patch release-buildsystem.diff for 3.12 version.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package rp-pppoe
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
|
Loading…
x
Reference in New Issue
Block a user