Re: [SLUG] Shell script calling shell script

From: Eben King (eben1@tampabay.rr.com)
Date: Fri Nov 19 2004 - 17:52:53 EST


On Fri, 19 Nov 2004, Chuck Hast wrote:

> On Fri, 19 Nov 2004 16:28:32 -0500 (EST), Eben King
> <eben1@tampabay.rr.com> wrote:
> > On Fri, 19 Nov 2004, Kwan Lowe wrote:
> >
> >
> >
> > > > If the sections are related, then what you might want to do is something
> > > > like
> > > >
> > > > for subsystem in foo bar baz quux ; do
> > > > $subsystem &
> > > > usleep 100000 # optional
> > > > done
> > > >
> > > > Nice and short, and you're assured that you call the subsystems in the
> > > > same way. Easy to add/delete subsystems, too.
> > >
> > > Instead of a sleep, you may want to use "wait" instead. It will pause the
> > > script until the sub returns.
> >
> > Will that have any effect with a "&"? If all of the subsystems start and
> > then return control, you're right; "wait" is better than "usleep".
>
> Looked up sleep and wait in O'Reilly's Linux in a Nutshell,

Ah, but I mentioned "usleep":

USLEEP(1) USLEEP(1)

NAME
       usleep - sleep some number of microseconds

SYNOPSIS
       usleep [number]

Good for when you want to pause for a non-integral number of seconds.

> I am going to add a few more as I seem to get hangups at times and I
> see things happening when they should not be. So I think I need to slow
> things down a bit here and there.
>
> Here is the start up file I am talking about, it is started up in rc5.d,
> it was originally called as S04ax25, I changed it to S99ax25 so it would
> be the last thing on the list to start, which helped but there are still
> things that appear to be spinning up when it does start up,

rc.local

> I have added some sleeps in there but I think I need to add more.

> ----------- Begin AX25-UP start up script ---------------------
> #!/bin/bash
> # Version = ax25-config-0.3.3
> sleep 20

Long sleep. What happens here?

> # Start6pac0
> # 6pack-Modul einbinden
> modprobe ax25; modprobe 6pack; modprobe mkiss; insmod rose

"insmod"? I don't think that'll work unless "rose" happens to be in $PWD .

> sleep 1

What are you waiting for?

> # StartKiss
> #/usr/sbin/kissattach /dev/ptyz0 0 44.1.1.1
> #/usr/sbin/mkiss -c -l /dev/ttyUSB0 /dev/ttyz0
> #/usr/sbin/kissparms -p 0 -r 128 -s 10 -l 20 -t 60
> #echo 100 > proc/sys/net/ax25/ax0/t1_timeout
> #echo 30 > /proc/sys/net/ax25/ax0/t2_timeout
> #echo 30000 > proc/sys/net/ax25/ax0/t3_timeout
> #echo 10 > proc/sys/net/ax25/ax0/maximum_retry_count
> #echo 4 > proc/sys/net/ax25/ax0/standard_window_size
> #echo 256 > proc/sys/net/ax25/ax0/maximum_packet_length
> # EndKiss0

Did they insert the "#"s or did you? I'm not familiar with ax25, so I'll
assume that doesn't affect the other connection(s).

> # Attach AXIP Port
> /usr/sbin/kissattach -m 1580 /dev/ptyq0 9 127.0.0.1
> sleep 2

Ditto: what are you waiting for?

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

"You're one of those condescending Unix computer users!" "Here's a nickel, kid. Get yourself a better computer" - Dilbert.

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:45:21 EDT