forked from pool/rp-pppoe
This commit is contained in:
parent
f30432270c
commit
87fa8843c7
@ -1,87 +0,0 @@
|
||||
--- scripts/pppoe-init-suse.in
|
||||
+++ scripts/pppoe-init-suse.in
|
||||
@@ -12,9 +12,19 @@
|
||||
# 2 or any later version.
|
||||
# Modifed to work with SuSE 6.4 linux by Gary Cameron.
|
||||
#
|
||||
-# Source function library.
|
||||
-#. /etc/rc.d/init.d/functions # For red hat?
|
||||
-. /etc/rc.config # For SuSE, enables setting from /etc/rc.config
|
||||
+# Modifed and fixed to work with SuSE linux by Anas Nashif <nashif@suse.de>
|
||||
+
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: rp-pppoe
|
||||
+# Required-Start: $remote_fs $syslog $network $named
|
||||
+# Required-Stop: $syslog $remote_fs
|
||||
+# Default-Start: 3 5
|
||||
+# Default-Stop: 0 1 2 6
|
||||
+# Short-Description: Start Roaring Penguin ADSL
|
||||
+# Description: Start Roaring Penguin ADSL
|
||||
+### END INIT INFO
|
||||
+
|
||||
+. /etc/rc.status
|
||||
|
||||
#Tweak this
|
||||
restart_time=120
|
||||
@@ -28,21 +38,27 @@
|
||||
STOP=@sbindir@/pppoe-stop
|
||||
STATUS=@sbindir@/pppoe-status
|
||||
|
||||
-test "$PPPoE_START" = "yes" || exit 0
|
||||
-
|
||||
# The echo return value for success (defined in /etc/rc.config).
|
||||
-return=$rc_done
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Bringing up PPPoE link"
|
||||
- $START > /dev/null 2>&1 || return=$rc_failed
|
||||
- echo -e "$return"
|
||||
+ $START > /dev/null 2>&1
|
||||
+ rc_status -v
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Shutting down PPPoE link"
|
||||
- $STOP > /dev/null 2>&1 || return=$rc_failed
|
||||
- echo -e "$return"
|
||||
+ $STOP > /dev/null 2>&1
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
+
|
||||
+ try-restart)
|
||||
+ ## Stop the service and if this succeeds (i.e. the
|
||||
+ ## service was running before), start it again.
|
||||
+ $0 stop && $0 start
|
||||
+
|
||||
+ # Remember status and be quiet
|
||||
+ rc_status
|
||||
;;
|
||||
|
||||
restart)
|
||||
@@ -50,15 +66,23 @@
|
||||
echo "Waiting" $restart_time "seconds for the host to reset itself"
|
||||
sleep $restart_time #Note: Need time for host to reset itself
|
||||
$0 start
|
||||
+ rc_status
|
||||
;;
|
||||
|
||||
status)
|
||||
- $STATUS
|
||||
+ checkproc /usr/sbin/pppoe; rc=$?
|
||||
+ if test $rc = 0; then echo "OK"
|
||||
+ else echo "No process"
|
||||
+ if test -e /var/run/pppoe.conf-adsl.pid.pppoe;
|
||||
+ then exit 1
|
||||
+ else exit 3
|
||||
+ fi
|
||||
+ fi
|
||||
;;
|
||||
|
||||
*)
|
||||
- echo "Usage: pppoe {start|stop|restart|status}"
|
||||
+ echo "Usage: pppoe {start|stop|restart|status|try-restart}"
|
||||
exit 1
|
||||
esac
|
||||
+rc_exit
|
||||
|
||||
-exit 0
|
11
rp-pppoe-3.10-config.patch
Normal file
11
rp-pppoe-3.10-config.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -ruN rp-pppoe-3.10-orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in
|
||||
--- rp-pppoe-3.10-orig/scripts/pppoe-connect.in 2008-06-30 14:00:42.000000000 +0000
|
||||
+++ rp-pppoe-3.10/scripts/pppoe-connect.in 2009-05-08 00:03:58.229112396 +0000
|
||||
@@ -48,7 +48,7 @@
|
||||
SETSID=""
|
||||
fi
|
||||
|
||||
-CONFIG=/etc//ppp/pppoe.conf
|
||||
+CONFIG=/etc/ppp/pppoe.conf
|
||||
USER=""
|
||||
ETH=""
|
144
rp-pppoe-3.10-init.patch
Normal file
144
rp-pppoe-3.10-init.patch
Normal file
@ -0,0 +1,144 @@
|
||||
diff -ruN rp-pppoe-3.10-orig/scripts/pppoe-init-suse.in rp-pppoe-3.10/scripts/pppoe-init-suse.in
|
||||
--- rp-pppoe-3.10-orig/scripts/pppoe-init-suse.in 2008-06-30 14:00:42.000000000 +0000
|
||||
+++ rp-pppoe-3.10/scripts/pppoe-init-suse.in 2009-05-08 00:07:50.511480596 +0000
|
||||
@@ -12,53 +12,114 @@
|
||||
# 2 or any later version.
|
||||
# Modifed to work with SuSE 6.4 linux by Gary Cameron.
|
||||
#
|
||||
-# Source function library.
|
||||
-#. /etc/rc.d/init.d/functions # For red hat?
|
||||
-. /etc/rc.config # For SuSE, enables setting from /etc/rc.config
|
||||
+# Modifed and fixed to work with SuSE linux by Anas Nashif <nashif@suse.de>
|
||||
+
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: rp-pppoe
|
||||
+# Required-Start: $remote_fs $syslog $network $named
|
||||
+# Required-Stop: $syslog $remote_fs
|
||||
+# Default-Start: 3 5
|
||||
+# Default-Stop: 0 1 2 6
|
||||
+# Short-Description: Start Roaring Penguin ADSL
|
||||
+# Description: Start Roaring Penguin ADSL
|
||||
+### END INIT INFO
|
||||
+
|
||||
+. /etc/rc.status
|
||||
|
||||
#Tweak this
|
||||
restart_time=120
|
||||
|
||||
# From AUTOCONF
|
||||
prefix=@prefix@
|
||||
-exec_prefix=@exec_prefix@
|
||||
+exec_prefix=${prefix}
|
||||
|
||||
# Paths to programs
|
||||
START=@sbindir@/pppoe-start
|
||||
STOP=@sbindir@/pppoe-stop
|
||||
STATUS=@sbindir@/pppoe-status
|
||||
|
||||
-test "$PPPoE_START" = "yes" || exit 0
|
||||
+CONFIG=`cat @sbindir@/pppoe-start | grep "^CONFIG" | awk -F"=" '{print $2}'`
|
||||
+CF_BASE=$(basename $CONFIG)
|
||||
+PIDFILE=`cat $CONFIG | grep "^PIDFILE" | awk -F"=" '{print $2}'`
|
||||
+PPPOE_PIDFILE=`cat @sbindir@/pppoe-connect | grep "^PPPOE_PIDFILE" | awk -F"=" '{print $2}'`
|
||||
+PPPD_PIDFILE=`cat @sbindir@/pppoe-connect | grep "^PPPD_PIDFILE" | awk -F"=" '{print $2}'`
|
||||
+
|
||||
+# IN: RET
|
||||
+chk_status(){
|
||||
+ RES=
|
||||
+ case $1 in
|
||||
+ 0) RES=0
|
||||
+ ;;
|
||||
+ 1) if [ -e $PPPOE_PIDFILE ] || [ -e $PPPD_PIDFILE ]; then
|
||||
+ RES=1
|
||||
+ else
|
||||
+ RES=3
|
||||
+ fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ return $RES
|
||||
+}
|
||||
+
|
||||
|
||||
# The echo return value for success (defined in /etc/rc.config).
|
||||
-return=$rc_done
|
||||
case "$1" in
|
||||
start)
|
||||
- echo -n "Bringing up PPPoE link"
|
||||
- $START > /dev/null 2>&1 || return=$rc_failed
|
||||
- echo -e "$return"
|
||||
- ;;
|
||||
+ echo -n "Bringing up PPPoE link: "
|
||||
+ $START > /dev/null 2>&1
|
||||
|
||||
+ # Remember status and be verbose
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
stop)
|
||||
- echo -n "Shutting down PPPoE link"
|
||||
- $STOP > /dev/null 2>&1 || return=$rc_failed
|
||||
- echo -e "$return"
|
||||
- ;;
|
||||
+ echo -n "Shutting down PPPoE link: "
|
||||
+ $STOP > /dev/null 2>&1
|
||||
|
||||
+ # Remember status and be verbose
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
+ try-restart)
|
||||
+ ## Stop the service and regardless of whether it was
|
||||
+ ## running or not, start it again.
|
||||
+ $0 stop
|
||||
+ $0 start
|
||||
+
|
||||
+ # Remember status and be quiet
|
||||
+ rc_status
|
||||
+ ;;
|
||||
restart)
|
||||
- $0 stop
|
||||
- echo "Waiting" $restart_time "seconds for the host to reset itself"
|
||||
- sleep $restart_time #Note: Need time for host to reset itself
|
||||
- $0 start
|
||||
- ;;
|
||||
-
|
||||
+ $0 stop
|
||||
+ echo "Waiting" $restart_time "seconds for the host to reset itself"
|
||||
+ sleep $restart_time #Note: Need time for host to reset itself
|
||||
+ $0 start
|
||||
+
|
||||
+ # Remember status and be quiet
|
||||
+ rc_status
|
||||
+ ;;
|
||||
+ reload|force-reload)
|
||||
+ echo -n "Reload PPPoE link: "
|
||||
+ rc_failed 5
|
||||
+
|
||||
+ # Remember status and be verbose
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
status)
|
||||
- $STATUS
|
||||
- ;;
|
||||
-
|
||||
+ echo -n "Checking PPPoE link: "
|
||||
+ # Return value is slightly different for the status command:
|
||||
+ # 0 - service up and running
|
||||
+ # 1 - service dead, but /var/run/ pid file exists
|
||||
+ # 2 - service dead, but /var/lock/ lock file exists
|
||||
+ # 3 - service not running (unused)
|
||||
+ # 4 - service status unknown :-(
|
||||
+ # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
|
||||
+ RET=`$STATUS > /dev/null 2>&1; echo $?`
|
||||
+ chk_status $RET
|
||||
+
|
||||
+ # Remember status and be verbose
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
*)
|
||||
- echo "Usage: pppoe {start|stop|restart|status}"
|
||||
- exit 1
|
||||
+ echo "Usage: pppoe {start|stop|restart|status|try-restart}"
|
||||
+ exit 1
|
||||
esac
|
||||
+rc_exit
|
||||
|
||||
-exit 0
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 8 02:15:32 CEST 2009 - chris@computersalat.de
|
||||
|
||||
- new patch for init script
|
||||
o added reload
|
||||
o rework of status
|
||||
- added config patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 11:30:25 UTC 2009 - chris@computersalat.de
|
||||
|
||||
- beautify spec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 4 11:40:26 CEST 2008 - hvogel@suse.de
|
||||
|
||||
|
@ -1,35 +1,48 @@
|
||||
#
|
||||
# spec file for package rp-pppoe (Version 3.10)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%if %{?rel:0}%{!?rel:1}
|
||||
%define rel 1
|
||||
%endif
|
||||
|
||||
Name: rp-pppoe
|
||||
BuildRequires: ppp
|
||||
Summary: A PPP Over Ethernet Redirector for PPPD
|
||||
Version: 3.10
|
||||
Release: 1
|
||||
Release: 27
|
||||
License: GPL v2 or later
|
||||
Group: Productivity/Networking/PPP
|
||||
Source: http://www.roaringpenguin.com/pppoe/rp-pppoe-%{version}.tar.bz2
|
||||
Url: http://www.roaringpenguin.com/pppoe
|
||||
Patch0: init-suse.diff
|
||||
#Patch0: init-suse.diff
|
||||
Patch1: docdir.diff
|
||||
Patch2: nonrfc-modems.diff
|
||||
Patch3: logger-path.diff
|
||||
Patch5: release-buildsystem.diff
|
||||
Patch6: resolve-conf.diff
|
||||
Patch8: strip.diff
|
||||
Patch10: %{name}-3.10-init.patch
|
||||
Patch11: %{name}-3.10-config.patch
|
||||
Requires: ppp >= 2.3.7
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
BuildRequires: ppp
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%description
|
||||
rp-pppoe is a user-space redirector which permits the use of PPPoE
|
||||
@ -43,47 +56,64 @@ Authors:
|
||||
David F. Skoll <http://www.roaringpenguin.com>
|
||||
|
||||
%prep
|
||||
#----------------------------------------------------------------------------------
|
||||
%setup -q
|
||||
%patch0
|
||||
#%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch5
|
||||
%patch6
|
||||
%patch8
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%build
|
||||
#----------------------------------------------------------------------------------
|
||||
cd src
|
||||
CFLAGS=$RPM_OPT_FLAGS \
|
||||
%configure
|
||||
make
|
||||
%{__make}
|
||||
cd ../gui
|
||||
make
|
||||
%{__make}
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%install
|
||||
#----------------------------------------------------------------------------------
|
||||
cd src
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
ln -sf ../../etc/init.d/pppoe $RPM_BUILD_ROOT/usr/sbin/rcpppoe
|
||||
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
||||
%{__ln_s} -f ../../etc/init.d/pppoe $RPM_BUILD_ROOT%{_sbindir}/rcpppoe
|
||||
cd ../gui
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT%_defaultdocdir/rp-pppoe
|
||||
mv $RPM_BUILD_ROOT/etc/ppp/plugins/README $RPM_BUILD_ROOT%_defaultdocdir/rp-pppoe/README.plugins
|
||||
rm -rf $RPM_BUILD_ROOT/etc/ppp/plugins
|
||||
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
||||
%{__install} -d $RPM_BUILD_ROOT%_defaultdocdir/rp-pppoe
|
||||
%{__mv} $RPM_BUILD_ROOT/etc/ppp/plugins/README $RPM_BUILD_ROOT%_defaultdocdir/rp-pppoe/README.plugins
|
||||
%{__rm} -rf $RPM_BUILD_ROOT/etc/ppp/plugins
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
#----------------------------------------------------------------------------------
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%preun
|
||||
#----------------------------------------------------------------------------------
|
||||
%stop_on_removal pppoe
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%post
|
||||
#----------------------------------------------------------------------------------
|
||||
%{fillup_and_insserv pppoe}
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%postun
|
||||
#----------------------------------------------------------------------------------
|
||||
%restart_on_update pppoe
|
||||
%{insserv_cleanup}
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
%files
|
||||
#----------------------------------------------------------------------------------
|
||||
%defattr(-,root,root)
|
||||
%dir %_defaultdocdir/rp-pppoe
|
||||
%doc %_defaultdocdir/rp-pppoe/*
|
||||
@ -91,15 +121,18 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%config(noreplace) /etc/ppp/pppoe-server-options
|
||||
%config(noreplace) /etc/ppp/firewall-masq
|
||||
%config(noreplace) /etc/ppp/firewall-standalone
|
||||
/usr/sbin/pppoe
|
||||
/usr/sbin/pppoe-server
|
||||
/usr/sbin/pppoe-sniff
|
||||
/usr/sbin/pppoe-relay
|
||||
/usr/sbin/pppoe-connect
|
||||
/usr/sbin/pppoe-start
|
||||
/usr/sbin/pppoe-stop
|
||||
/usr/sbin/pppoe-setup
|
||||
/usr/sbin/pppoe-status
|
||||
%{_bindir}/tkpppoe
|
||||
%{_sbindir}/pppoe
|
||||
%{_sbindir}/pppoe-server
|
||||
%{_sbindir}/pppoe-sniff
|
||||
%{_sbindir}/pppoe-relay
|
||||
%{_sbindir}/pppoe-connect
|
||||
%{_sbindir}/pppoe-start
|
||||
%{_sbindir}/pppoe-stop
|
||||
%{_sbindir}/pppoe-setup
|
||||
%{_sbindir}/pppoe-status
|
||||
%attr (4750,root,dialout) %{_sbindir}/pppoe-wrapper
|
||||
%{_sbindir}/rcpppoe
|
||||
%{_mandir}/man5/pppoe.conf.5*
|
||||
%{_mandir}/man8/pppoe.8*
|
||||
%{_mandir}/man8/pppoe-server.8*
|
||||
@ -111,10 +144,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man8/pppoe-status.8*
|
||||
%{_mandir}/man8/pppoe-setup.8*
|
||||
/etc/init.d/pppoe
|
||||
/usr/sbin/rcpppoe
|
||||
%dir /etc/ppp/rp-pppoe-gui
|
||||
%attr (4750,root,dialout) /usr/sbin/pppoe-wrapper
|
||||
/usr/bin/tkpppoe
|
||||
%{_mandir}/man1/tkpppoe.1*
|
||||
%{_mandir}/man1/pppoe-wrapper.1*
|
||||
%dir /usr/share/tkpppoe
|
||||
@ -128,8 +158,17 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/tkpppoe/props-options.png
|
||||
/usr/share/tkpppoe/en.msg
|
||||
/usr/share/tkpppoe/ja.msg
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Fri May 08 2009 chris@computersalat.de
|
||||
- new patch for init script
|
||||
o added reload
|
||||
o rework of status
|
||||
- added config patch
|
||||
* Wed Apr 15 2009 chris@computersalat.de
|
||||
- beautify spec
|
||||
* Fri Jul 04 2008 hvogel@suse.de
|
||||
- update to version 3.10
|
||||
* some compilation fixes
|
||||
|
Loading…
Reference in New Issue
Block a user