LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2006, 07:18 PM   #1
lilili
Member
 
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196

Rep: Reputation: 30
simple sheel script?


Hi
I'm trying to write a shell script to simply reconnect everytime slapt-get has a timed out.

Get ftp://ftp.slackware.com/pub/slackwar...kware-current/ gcc-gnat 3.4.5-i486-1 [8MB]...Failed to download: FTP response timeout
this is the message I get when timed out.

I'm thinking whenever that message shows up, the script will enter slapt-get --upgrade and them answer y when slapt-get ask whether I want to upgrade or not.

How can I do this?

Thank you
 
Old 02-11-2006, 09:47 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Basically, you want a daemon to keep watch on the connection, and reconnect when it times out.

So, the place to start is with the Daemon Writing HOWTO.
 
Old 02-13-2006, 10:31 PM   #3
jaos
LQ Newbie
 
Registered: Aug 2005
Posts: 23

Rep: Reputation: 5
Quote:
Originally Posted by lilili
Hi
I'm trying to write a shell script to simply reconnect everytime slapt-get has a timed out.

Get ftp://ftp.slackware.com/pub/slackwar...kware-current/ gcc-gnat 3.4.5-i486-1 [8MB]...Failed to download: FTP response timeout
this is the message I get when timed out.

I'm thinking whenever that message shows up, the script will enter slapt-get --upgrade and them answer y when slapt-get ask whether I want to upgrade or not.

How can I do this?

Thank you
You want the --retry option.

Code:
--retry []          - specify number of download retry attempts
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Need help with a simple script shell script WindowBreaker Linux - Software 2 12-15-2005 12:45 PM
Sheel Script kjsubbu Linux - General 5 11-25-2004 07:14 PM
sheel scripting (open new terminal and print in it) chunlee Linux - Newbie 2 10-15-2004 01:33 PM
Simple C Shell script is not so simple elconde Programming 2 09-16-2001 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration