Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-13-2005, 03:09 PM   #1
Registered: Aug 2003
Distribution: Slackware, Ubuntu
Posts: 158

Rep: Reputation: 30
Automating Swaret

I am looking for a script to automate swaret through cron. there are a couple of things that I would like it to do that I don't know how to do.

1. the script should check for a connection though eth0 (using DHCP, if that helps); if not then fail
2. limit the amount of bandwith swaret will use to 20 kb/s (not sure this is possible)
3. Run --update, --upgrade -a (that's the easy part)

The limit request is that I only have a broadband connection at work and I don't wan't to suck it all up (the office is only allocated for 100K, were non-profit!).

Thanks in advance for any advice!
Old 10-13-2005, 05:28 PM   #2
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
1) you mean the script has to bring up eth0 ?
if so, you can call "/etc/rc.d/rc.inet1 eth0_start "
and "/etc/rc.d/rc.inet1 eth0_stop " to close the connection.
maybe after starting up, ping the server swaret needs to check the connection.

2)if you use a 2.6.13 kernel there is the possibility to set a max kb/sec for a certain ip
by using iptables-rules.
i don't know the ins and outs, but it's there.

3)just type the commands in the script.

4) i really wouldn't run swaret or any autopackage-manager through a cronjob.
( i myself never use them )
if you just update without at least taking a quick look at the changelog,
some things might brake.
it's a bad idea...

Old 10-13-2005, 06:14 PM   #3
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
I thought about this for a bit a while back and it just isn't worth the effort. Slackware does not need to be updated frequently enough to even think about a cron job. If you are really worried about getting updates then subscire your cell phone to the update mailing list or something. Instead of a cron job set
as your home page and run swaret first thing in the morning if you need to.


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
Automating PINE Kedelfor Programming 1 05-22-2005 01:47 PM
Automating Modprobe gauntalus Linux - Wireless Networking 4 01-14-2005 10:57 AM
Deleting Swaret files in /var/swaret?? Garibaldi3489 Slackware 2 12-30-2004 04:10 PM
automating dialup rlucas Linux - Networking 1 08-07-2004 08:06 PM
Automating modprobe? r_jensen11 Linux - Hardware 3 09-07-2003 08:30 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:33 AM.

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