Hi all,
Following some problems with my ADSL connection, I installed the new
drivers 1.3 on my FC2. I found a great improvement with this version, so
thanks Benoit ! :)
After that, I updated my RPM of speedtouch to version 1.3 and take
advantage of the new improvements.
* Sun Jun 20 2004 Frederic RUAUDEL <[EMAIL PROTECTED]> 1.3-2.GrumZ
- Patch the speedtouch-start script to clean the mutex created by
modem_run and to skip running modem_run if the firmware is already loaded
- Patch the location of pppd pid in speedtouch-stop
- Remove the startadsl.sh script
- Modify the adsl init script to use speedtouch-start/speedtouch-stop
- Add the configuration file speedtouch.conf with the good values
- Remove the creation of /etc/speedtouch.conf in %post section
- Modify the configure line in the %build section to set the good
default path
to avoid having the buildroot set in the speedtouch-(start|stop) script
As you can see, I've had to patch the start/stop script to make it works
smoothly on my FC2. Here are the details :
1) speedtouch_clean_mutex.patch
This patch fix a problem with the new mutex system of modem_run. When
you stop modem_run, the mutex is not cleaned so when you try to start it
up again, modem_run just print in /var/log/messages :
modem_run version 1.3 started by root uid 0
and then stop without any clue ! After looking at the code I found that
it was the mutex "deadbeef" ;-)
So I had an ipcrm in the speedtouch-start script but this is a dirty
hack and I think, if this is a bug and not a feature, that benoit will
certainly find a better solution :)
2) speedtouch_check_firmware_load.patch
this patch check the state of the ADSL line present in the file
/proc/net/atm/speedtch*, and if the line is reported up and the firmware
loaded, it skip the launch of modem_run and directly launch pppd instead
of failing the load of the firmware and quit.
3) speedtouch_fix_pppd_pid.patch
the last one is probably FC2 specific or maybe a missing configuration
in my pppd package, but my pppd put its PID in /var/run/ppp0.pid and not
in /var/run/ppp-${PPPD_PEER}.pid. So I made this patch to make it work
with my current RPMS.
Feel free to tell me where I'm wrong, if I am.
For other changes, I remove my startadsl.sh script and use the
speedtouch-(start|stop) instead and generate a good default
speedtouch.conf for the firmware that I provide with my package. The
hotplug support works very well for me, another great feature added in
1.3 (I know it's not new, but I never manage to configure it manually ;).
And I added a friendly interface to my RPMs repository with a summary of
the things to do to installed my RPMS :
http://grumz.dyndns.org/ADSL_FC2
Comments and feedback are welcome !
Have a nice day,
Fred
Benoit PAPILLAULT wrote:
>>=========================================================================
>>PLEASE, read the file INSTALL or INSTALL.fr in the package to know how
>>to install it. It is VERY different from previous release (and hopefully
>>a lot easier).
>>==========================================================================
>>
>>
>
>A i586 rpm package and source package are now available. Those packages
>have been compiled on a Mandrake 10.0 system with a Pentium II processor.
>
>They are available on the Sourceforge Project Filelist:
>http://sourceforge.net/project/showfiles.php?group_id=32758
>
>I'd like to have reports from Mandrake users (and other RPM based
>distro) about their success (failure?) to use it.
>
>Benoit PAPILLAULT
>
>Liste de diffusion modem ALCATEL SpeedTouch USB
>Pour se d�sinscrire : mailto:[EMAIL PROTECTED]
>
>
>
>
>
-- Attached file included as plaintext by Listar --
-- File: speedtouch_fix_pppd_pid.patch
diff -ru speedtouch-1.3/src/speedtouch-stop.in speedtouch.new2/src/speedtouch-stop.in
--- speedtouch-1.3/src/speedtouch-stop.in 2004-06-10 18:36:35.000000000 +0200
+++ speedtouch.new2/src/speedtouch-stop.in 2004-06-20 13:04:42.241448448 +0200
@@ -32,8 +32,10 @@
fi
-PID=`head -1 "/var/run/ppp-${PPPD_PEER}.pid"`
-kill -TERM $PID
+if [ -f /var/run/ppp0.pid ]; then
+ PID=`head -1 "/var/run/ppp0.pid"`
+ kill -TERM $PID
+fi
# like we said in speedtouch-start, we don't ever kill modem_run
# killall modem_run
-- Attached file included as plaintext by Listar --
-- File: speedtouch_clean_mutex.patch
diff -ru speedtouch-1.3/src/speedtouch-start.in
speedtouch-1.3.new/src/speedtouch-start.in
--- speedtouch-1.3/src/speedtouch-start.in 2004-06-10 18:36:35.000000000 +0200
+++ speedtouch-1.3.new/src/speedtouch-start.in 2004-06-20 12:30:16.679461600 +0200
@@ -18,6 +18,12 @@
exit -1
fi
+# cleaning the mutex
+ipcs -a | grep 0xdeadbeef >/dev/null 2>&1
+if [ $? = 0 ]; then
+ ipcrm -S 0xdeadbeef
+fi
+
echo "Starting ADSL connection..."
# load usbcore if needed
-- Attached file included as plaintext by Listar --
-- File: speedtouch_check_firmware_load.patch
diff -ru speedtouch-1.3.new/src/speedtouch-start.in
speedtouch.new/src/speedtouch-start.in
--- speedtouch-1.3.new/src/speedtouch-start.in 2004-06-20 12:30:16.679461600 +0200
+++ speedtouch.new/src/speedtouch-start.in 2004-06-20 12:39:03.087435424 +0200
@@ -152,8 +152,12 @@
# should write a small executable that get the mac addresse from the
# modem and use it as a key)
-if ! modem_run $MODEM_RUN_OPTIONS; then
- exit 1
+# first check if the firmware is not already loaded, if so, skip
+cat /proc/net/atm/speedtch* | grep "Line up, firmware loaded" >/dev/null 2>&1
+if [ $? != 0 ]; then
+ if ! modem_run $MODEM_RUN_OPTIONS; then
+ exit 1
+ fi
fi
#
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]