Re: crond

From: Giuseppe Greco (giuseppe.greco_at_agamura.com)
Date: 01/05/05

  • Next message: Giuseppe Greco: "ppp"
    Date: Wed, 5 Jan 2005 08:49:55 +0100 (CET)
    To: fedora-list@redhat.com
    
    

    Hi Gene,

    > On Wednesday 05 January 2005 01:18, Giuseppe Greco wrote:
    >>On Tue, 2005-01-04 at 20:09 -0600, Jeff Vian wrote:
    >>> On Tue, 2005-01-04 at 20:04 -0500, Erik Hemdal wrote:
    >>> > > I've written the following script (named checkconn)
    >>> > > to be executed every 5 minutes by crond:
    >>> >
    >
    > First off, one post is sufficient, I ahve 4 identicals showing in the
    > inqueue right now.

    I'm sorry... but I answered 2 different messages. Furthermore, I usually
    reply all, so you probably got a message addressed to the fedora mailing
    list and a message addressed to you...

    >
    > Thats because your script doesn't tell cron howto execute it.
    > When you exec it from the cli, the shell (probably bash) interprets it
    > and everything is fine. But when cron looks at it, it hasn't the
    > foggiest who to hand it to since bash or /bin/sh if you will, is no
    > more preferable than perl, python, ruby, regina or tcl/tk.
    >
    > To do this, the first line of your script needs to be
    >
    > #!/bin/sh
    >
    > and then append the rest of your stuff in subsequent lines.

    Yes, this line was already there... Now I've replaced the
    calls to "adsl-stop" and "adsl-start" with "ifdown ppp0" and
    "ifup ppp0", respectively. That does work!

    Of cource, this is just a quick-and-durty, temporary solution
    to let my gateway provide Internet access to other clients...

    The next step would be to discover why pppoe suddently stops
    working... Could the dynamic change of the IP address play a
    role in this story? I've noted that after the script above
    restarts the ppp0 interface, ddclient notifies an IP address
    change...

    j3d.

    >>> > >
    >>> > >
    >>> > >
    >>> > > Any idea?
    >>> > > j3d.
    >>> >
    >>> > Here are a few thoughts. Anything in /sbin is likely to need
    >>> > root privilege to run.
    >>> > So make sure that you use root's crontab, or place the entries
    >>> > in /etc/crontab and specify
    >>> > that they run as user root. Also, since cron uses a limited
    >>> > path, make certain that
    >>> > /root/cron is in the path (add a PATH= line to the crontab
    >>> > entry). Try man 8 crontab (IIRC) for information
    >>> > on the crontab file format as opposed to the crontab command.
    >>>
    >>> 1. For Erik:
    >>> His command uses the full path. Thus the path comment above
    >>> is superfluous.
    >>>
    >>> 2. for j3d.
    >>> The script being called by cron should contain a shebang line
    >>> as the first line. Does it?
    >>> it should look like "#! /bin/sh". You can look at any of the
    >>> scripts in /etc/init.d to see what should be there.
    >>>
    >>> 3. For j3d:
    >>> What is the purpose of stop/start the adsl connection every 5
    >>> minutes? As I understand it you are simply verifying the
    >>> connection is intact. It would make more sense to do a simple
    >>> ping to some host on the internet, and if that fails then do the
    >>> stop/start. Otherwise the connection is good and you quit.
    >>> A drawback to your approach is that the IP address may (and
    >>> often does) change when the adsl connection is re-established. If
    >>> you are using it the IP change may kick you off, and with a long
    >>> download that can be a problem.
    >>
    >>Often the pppoe connection stops working even if pppd is still
    >> running, and then I'm not able to access the Internet anymore. When
    >> that happens, the only thing I can do is to restart the ppp0
    >> interface...
    >>
    >>I'm trying to figure out the source of the problem, but till now no
    >>way...
    >>
    >>j3d.
    >>
    >>
    >>
    >>
    >>--
    >>----------------------------------------
    >>Giuseppe Greco
    >>
    >>::agamura::
    >>
    >>phone: +41 (0)91 604 67 65
    >>mobile: +41 (0)79 602 99 27
    >>email: giuseppe.greco@agamura.com
    >>web: www.agamura.com
    >>----------------------------------------
    >
    > --
    > Cheers, Gene
    > "There are four boxes to be used in defense of liberty:
    > soap, ballot, jury, and ammo. Please use in that order."
    > -Ed Howdershelt (Author)
    > 99.31% setiathome rank, not too shabby for a WV hillbilly
    > Yahoo.com attorneys please note, additions to this message
    > by Gene Heskett are:
    > Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
    >

    ----------------------------------------
    Giuseppe Greco

    ::agamura::

    phone: +41 (0)91 604 67 65
    mobile: +41 (0)79 602 99 27
    email: giuseppe.greco@agamura.com
    web: www.agamura.com
    ----------------------------------------

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Giuseppe Greco: "ppp"

    Relevant Pages

    • Re: cx88 totally fried in 2.6.15-rcX -was- Re: HD3000 - no NTSC via tuner
      ... On Monday 28 November 2005 20:17, Michael Krufky wrote: ... as it would apply to a working 2.6.14.x kernel. ... that I comment/uncomment stuff in the buildit (thats another script I ... message by Gene Heskett are: ...
      (Linux-Kernel)
    • Re: cron miss-fire
      ... On Monday 27 November 2006 08:42, Gene Heskett wrote: ... I didn't get any mail from amanda this morning, ... log of the script having been run at 1:01 this morning. ... shell where I launched kcron reported the root catcher exit of the ...
      (Fedora)
    • Re: weird fam/samba problem
      ... Gene Heskett wrote: ... or did back when I set that script up ... though umount -l does the trick. ... People having trouble with vz bouncing email to me should add the word ...
      (Debian-User)
    • Re: cron miss-fire
      ... On Monday 27 November 2006 05:38, Gene Heskett wrote: ... I didn't get any mail from amanda this morning, and no record in the log ... of the script having been run at 1:01 this morning. ... kcron, highlighted the command line, pulled down the edit menu and told ...
      (Fedora)
    • Re: About boot scripts and pppoe [was Dydns service]
      ... > That's all that was needed and I put this in a script that scarts ppp ... I have given a sleep time for ddclient as 3 mintes ... > but even this much is less and it fails when the ppp0 IP takes more ... > And is there way I can execute the scripts that I have under ...
      (Debian-User)