linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: urgrue <urgrue@tumsan.fi>
To: admin <linux-admin@vger.kernel.org>
Subject: bash scripting..simple question
Date: Fri, 13 Sep 2002 12:16:11 +0300	[thread overview]
Message-ID: <20020913091611.GA29785@fede2.tumsan.fi> (raw)

is there a way, in a bash script, to do something like:
execute "this_command these_params" 
--if-its-not-done-in-600-seconds-then-kill-it-and-return-an-error-code

situation is, i have a simple script that logs into remote boxes, and 
does some checks.
it first pings each box to see if the route is up, if that fails it 
wont even try to log in.
but sometimes, a box can be pinged but not logged into, for various 
reasons.
in these cases, the ssh login attempt seems to just sit there and 
doesnt timeout, and the whole script hangs, waiting until ssh exits. 
which i have observed to take at times HOURS, at times it _never_ exits.

any suggestions?


             reply	other threads:[~2002-09-13  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-13  9:16 urgrue [this message]
2002-09-13  9:37 ` bash scripting..simple question Carl
2002-09-13  9:51 ` Michael Salmon
2002-09-13 14:55 ` Glynn Clements
  -- strict thread matches above, loose matches on Subject: below --
2002-09-13 13:57 grottoBoy rant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020913091611.GA29785@fede2.tumsan.fi \
    --to=urgrue@tumsan.fi \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).