getty_ps: uugetty w/scheduling...

getty_ps: uugetty w/scheduling...

Post by Gary Moy » Tue, 30 Nov 1993 17:31:04



I've been (vainly) trying to get uugetty to work with scheduling with no
luck whatsoever.  I've grabbed the latest sources off sunsite (2.07b) and
compiled it.  

I'm using the supplied /etc/default/uugetty.<device> file (w/ tweaks only
to the time schedule).  With the uugetty running I see activity on the
(via the panel) but answer never goes on.  Here's the script (w/ comments
removed):

/etc/default/uugetty.cua2:
ALTLOCK=cua2

SCHED=0:2:17-0:8:00 1:0:00-1:8:00 2:0:00-2:8:00 3:0:00-3:8:00 4:0:00-4:8:00 5:00:00-5:8:00 6:18:45-6:18:50

OFF="" \d+++\dAT\r OK\r\n ATH0\r OK\r\n AT\sM0\sE1\sQ0\sV1\sX4\sS0=0\r OK\r\n

TIMEOUT=60

INIT="" \d+++\dAT\r OK\r\n ATH0\r OK\r\n AT\sM0\sE1\sQ0\sV1\sX4\sS0=1\r OK\r\n

DELAY=1

Oh yeah, modem is a Practical Peripherals 9600 Hayes compatible.  
Has anyone got this working ?

Thanks!

  -g.m.
--
===============================================================================


             "Linux: more than an OS -- it's a social movement"

 
 
 

getty_ps: uugetty w/scheduling...

Post by John Paul Morris » Wed, 01 Dec 1993 06:26:03




>I've been (vainly) trying to get uugetty to work with scheduling with no
>luck whatsoever.  I've grabbed the latest sources off sunsite (2.07b) and
>compiled it.  

>I'm using the supplied /etc/default/uugetty.<device> file (w/ tweaks only
>to the time schedule).  With the uugetty running I see activity on the
>(via the panel) but answer never goes on.  Here's the script (w/ comments
>removed):

Quite simple, the getty scheduling is broken. I sent patches to the
author several months ago, but I don't think there have been any updates
to gettyps in a long time. (last month I had to make more changes, daylight
savings!).

Scheduling with gettyps will work if you live in England ;-)
I think if you set the schedule to GMT it will work.

You might try this patch:

*** /tmp/getty_ps/main.c        Tue Apr 20 09:51:44 1993
--- main.c      Fri Nov 12 18:30:03 1993
***************
*** 168,178 ****
  {
        time_t          t_cur, t_base, t_begin, t_end;
        int             s_dow, s_hr, s_min, e_dow, e_hr, e_min, count;

  /* set up the time base
  */
!       (void) time(&t_cur);
        t_base = t_cur - ((t_cur + 4 * 86400) % 604800);

  /* parse the sched line
  */
--- 168,187 ----
  {
        time_t          t_cur, t_base, t_begin, t_end;
        int             s_dow, s_hr, s_min, e_dow, e_hr, e_min, count;
+       long int        tz_s;
+       struct tm       *tm;

  /* set up the time base
  */
!       (void) time(&t_cur);  
!       tm = localtime (&t_cur);
!       debug3(D_SCH, "time is now: %d\n", t_cur);
!      
! /*    tz_s = timezone - (daylight ? 3600 : 0) ; */
!       tz_s = timezone - (tm->tm_isdst ? 3600 : 0) ;
!      
        t_base = t_cur - ((t_cur + 4 * 86400) % 604800);
+       debug3(D_SCH, "t_base is now: %d\n", t_base);

  /* parse the sched line
  */
***************
*** 181,192 ****
        while(sscanf(nextword(p, &count), "%d:%d:%d-%d:%d:%d",
          &s_dow, &s_hr, &s_min, &e_dow, &e_hr, &e_min) == 6) {
                p += count;
!               t_begin = t_base + (s_dow % 7) * 86400 + s_hr * 3600
!                 + s_min * 60;
!               t_end = t_base + (e_dow % 7) * 86400 + e_hr * 3600
!                 + e_min * 60;

! /* hadle week overlaps
  */

                if(t_end < t_begin) {
--- 190,201 ----
        while(sscanf(nextword(p, &count), "%d:%d:%d-%d:%d:%d",
          &s_dow, &s_hr, &s_min, &e_dow, &e_hr, &e_min) == 6) {
                p += count;
!               t_begin = t_base + ((s_dow % 7) * 86400 + s_hr * 3600
!                 + s_min * 60 + tz_s) % 604800;
!               t_end = t_base + ((e_dow % 7) * 86400 + e_hr * 3600
!                 + e_min * 60 + tz_s) % 604800;

! /* handle week overlaps
  */

                if(t_end < t_begin) {
***************
*** 483,489 ****
  /* set the line owned by root
  */

!       (void) chmod(devname, 0666);
        if (! stat(devname, &st)) (void) chown(devname, 0, st.st_gid);

--- 492,498 ----
  /* set the line owned by root
  */

!       (void) chmod(devname, 0660);
        if (! stat(devname, &st)) (void) chown(devname, 0, st.st_gid);

>--
>===============================================================================


>             "Linux: more than an OS -- it's a social movement"

--
___________________________________________________________________________
 John Paul Morrison                        
 University of British Columbia, Canada    
 Electrical Engineering                  

 Day 35 of Canada held hostage: the socialist Liberal tax & spend tyranny

 
 
 

getty_ps: uugetty w/scheduling...

Post by Bill Rom » Tue, 30 Nov 1993 23:10:28



Quote:(Gary Moyer) writes:
>I've been (vainly) trying to get uugetty to work with scheduling with no
>luck whatsoever.  I've grabbed the latest sources off sunsite (2.07b) and
>compiled it.  

SCHED is broken in 2.0.7b.  Take a look at the source code.  It will only
process the first schedule interval, and will sometimes try to sleep until
Jan 1, 1970.

I have an incomplete patch which I have used successfully (although it once
had an unexplained episode of core dumps, which is why I haven't offered
it to anyone else).  It is of somewhat limited utility, as the maximum
input line length restricts the number of scheduling intervals which can
be defined.  I've also been working on this, but since I have no need for
dialin access at the moment, my attention has been focused elsewhere.

Anyway, if the maintainers of getty_ps want to play with this, I'd be glad
to mail them what I have so far.
--

Recently at PC Expo, Bill Gates said that Windows NT is "a form of Unix....
In a short time, it will be the most popular form of Unix ever....  Windows
NT will outsell those other incompatible versions of Unix."  --   Infoworld

 
 
 

getty_ps: uugetty w/scheduling...

Post by Gert Doeri » Thu, 02 Dec 1993 21:49:20




>(Gary Moyer) writes:
>>I've been (vainly) trying to get uugetty to work with scheduling with no
>>luck whatsoever.  I've grabbed the latest sources off sunsite (2.07b) and
>>compiled it.  
>SCHED is broken in 2.0.7b.  Take a look at the source code.  It will only
>process the first schedule interval, and will sometimes try to sleep until
>Jan 1, 1970.

With mgetty+sendfax, you can do scheduling via cron.

gert
--
I've got a signature breakdown! Anybody got a spare one?



 
 
 

1. uugetty (getty_ps)

I am attempting to set up uugetty to allow dial in and out on a single
line.
It now *nearly* works.
It answers calls fine, but if I attempt to use it for dial out (using
kermit, mincom, pcom or dip) nothing is echoed back on the screen from
the modem at first. If I blindly type "ATi4" (its a US Robotics) the
second half of the status display is shown. Then it is ok for the rest
of the call.
I have put a serial line monitor in circuit with the modem, and it is
behaving normally ie Linux seems to swallowing the data.

Can any one help?

--
Leo Leibovici
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Software Development Manager
Nouveau Solutions Ltd
Suite 2, Parkside House
15 Headley Road
WOODLEY
Berkshire, UK
RG5 4JB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. How to save memory?

3. getty_ps/uugetty dialin config

4. Fix floppy io ports reservation

5. agetty vs getty_ps/uugetty?

6. Problems with Syquest on Linux,Dos,Mac

7. uugetty getty_ps-2.0.7(i and j) SCHED broken

8. how to uninstall netscape 6

9. getty_ps.2.0.7h (uugetty)

10. uugetty / Getty_ps problem solved, I think

11. getty_ps and dial-in - request

12. getty_ps & selection setup? help...

13. getty_ps-- CONNECT SEQUENCE FAILED.