Bug#308457: linesrv: Shell-based workaround

2005-05-12 Thread Marco Presi
 || On Wed, 11 May 2005 20:17:37 -0500
 || Chris Howie <[EMAIL PROTECTED]> wrote: 

 Hi Chris,


ch> Package: linesrv
ch> Version: 2.1.15-8
ch> Followup-For: Bug #308457

ch> I've been examining the linesrv sources, and have found that
ch> the server actually does convert the line types as I
ch> suggested, but since all of the clients are marked offline
ch> after the connection is dropped, the server drops it when it
ch> comes back up.


ch> There are a few possible ways to fix this:

ch> 1) Don't mark all the clients as offline when the connection
ch> does down.  
ch> 2) Don't drop a line if it comes up when no
ch> clients are online -- just wait for one to go online, then
ch> offline, and then drop the line.

I will forward your consideration to the upstream.

ch> A workaround I've developed involves two shell scripts, one

[...]

I think you could obtain the same behavior just using pon and
poff commands, without resorting to external shell scripts.

For example

script_up pon line1
script_dn poff line1



Ciao Ciao

Marco

-- 
"I videogiochi non influenzano i bambini. Voglio dire, se Pac-Man avesse
influenzato la nostra generazione, staremmo tutti saltando in sale
scure, masticando pillole magiche e ascoltando musica elettronica
ripetitiva."

"Videogames do not influence kids. I mean, if Pac-Man influenced our
generation, we were all jumping in dark rooms, chomping pills and
listening to electronic repeating music."

Kristian Wilson, Nintendo Inc. 1989


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308457: linesrv: Shell-based workaround

2005-05-11 Thread Chris Howie
Package: linesrv
Version: 2.1.15-8
Followup-For: Bug #308457

I've been examining the linesrv sources, and have found that the server
actually does convert the line types as I suggested, but since all of
the clients are marked offline after the connection is dropped, the
server drops it when it comes back up.

There are a few possible ways to fix this:
1) Don't mark all the clients as offline when the connection does down.
2) Don't drop a line if it comes up when no clients are online -- just
wait for one to go online, then offline, and then drop the line.

A workaround I've developed involves two shell scripts, one for bringing
wvdial up, and one for dropping it.  The contents of the appropriate
files are below.  This workaround seems to work well, except that the
line status does not go down if my ISP drops the line.  This has two
side-effects: linesrv doesn't drop the line when it comes back up (which
is good); and neither linesrv nor the clients know that the line went
down, so people will be confused that nothing is working, and throughput
statistics will not be reset (which is bad).


### Bottom of /etc/linesrv/linesrv.conf ###
line Spitfire
interface ppp0
con_type file
con_status_file /var/run/wvdial
script_up /root/wvdial-up.sh
script_dn /root/wvdial-down.sh
script_esc /root/wvdial-down.sh
allow_manually no
send_throughput yes
con_timeout 60
##


### /root/wvdial-up.sh ###
#!/bin/sh

touch /var/run/wvdial
wvdial shh
rm -f /var/run/wvdial
##


### /root/wvdial-down.sh
#!/bin/sh

killall wvdial
##


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages linesrv depends on:
ii  debconf 1.4.30.13Debian configuration management sy
ii  libc6   2.3.2.ds1-21 GNU C Library: Shared libraries an
ii  libpam0g0.76-22  Pluggable Authentication Modules l

-- debconf information:
  linesrv/no_line_section:
* linesrv/use_debconf: true
* linesrv/address: 0.0.0.0
  linesrv/remember_to_create_file:
* linesrv/replace_conf_file: false
* linesrv/no_tool:
* linesrv/which_tool: wvdial
---
[This E-mail scanned for viruses by Declude Virus]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]