LinuxQuestions.org
Register a domain and help support LQ
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, 08: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, 10:47 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
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, 11:31 PM   #3
jaos
LQ Newbie
 
Registered: Aug 2005
Posts: 16

Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:19 AM
Need help with a simple script shell script WindowBreaker Linux - Software 2 12-15-2005 01:45 PM
Sheel Script kjsubbu Linux - General 5 11-25-2004 08:14 PM
sheel scripting (open new terminal and print in it) chunlee Linux - Newbie 2 10-15-2004 02:33 PM
Simple C Shell script is not so simple elconde Programming 2 09-17-2001 12:53 AM


All times are GMT -5. The time now is 04:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration