LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-12-2009, 02:49 PM   #1
Cyberman
Member
 
Registered: Aug 2005
Distribution: Debian Stable
Posts: 218

Rep: Reputation: 17
Problem using apt-get -d upgrade cronjob for Debian Sid


As of late, for some odd reason, apt-get isn't playing nice. It doesn't want to do its timed upgrade downloads. In the past, I believe my script worked. Something as of late has disabled me from downloading updates at various intervals.

When I double-click on update-notifier, it says there are no downloads 0.00 MB. However, there is still a "smart upgrade" available. Once I go into "smart upgrade" mode, it starts to tell me there are still things to download. I don't understand why this is. It makes me think that my scripts aren't working. But I don't understand how that is, because when I manually use

Code:
apt-get -y -d upgrade
the things download.

The manual input shouldn't be any different from the script, but maybe something is? It appears that the apt-get update cronjobs are working. So, I don't know what the real issue is. Maybe some of you have experienced what I'm experiencing and know what I can do? Logically, I don't understand what I'm doing wrong. Is it trickle?

Yes, it runs in root.

crontab -e

Code:
############################################
# Download possible apt-get upgrades
#-------------------------------------------
0 */1 * * * /bin/bash /root/scripts/aptupgrade/download-1am
30 */2 * * * /bin/bash /root/scripts/aptupgrade/download
############################################

cat /root/scripts/aptupgrade/download-1am

Code:
#!/bin/sh
if [ -e /root/scripts/aptupgrade/inprocess ]
then
	exit
else
	echo "1" >> /root/scripts/aptupgrade/inprocess
	apt-get update
	apt-get -y --force-yes -d upgrade
	rm /root/scripts/aptupgrade/inprocess
	exit
fi

cat /root/scripts/aptupgrade/download

Code:
#!/bin/sh
if [ -e /root/scripts/aptupgrade/inprocess ]
then
	exit
else
	echo "1" >> /root/scripts/aptupgrade/inprocess
	apt-get update
	trickle -s -d 20 apt-get -y -d upgrade
	rm /root/scripts/aptupgrade/inprocess
	exit
fi

Last edited by Cyberman; 03-12-2009 at 03:02 PM.
 
Old 03-12-2009, 03:12 PM   #2
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Whats wrong with just using cron-apt?

Description: automatic update of packages using apt-get
Contains a tool that is run by a cron job at regular intervals. By default it
just updates the package list and downloads new packages without installing.
You can instruct it to run anything that you can do with apt-get
(or aptitude).
.
It can optionally send mail to the system administrator on errors, log
to syslog or a separate log file.
.
Observe that this tool may be a security risk, so you should not set it
to do more than necessary. Automatic upgrade of all packages is NOT
recommended unless you are in full control of the package repository.
 
  


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
apt-get upgrade error in sid zakkeyboorock Debian 7 05-03-2006 04:59 AM
apt-get uprade problem in debian sid zakkeyboorock Debian 5 03-20-2006 02:11 PM
gpg errors after apt upgrade (sid) darkleaf Debian 2 06-28-2005 09:22 AM
[Debian Sid] apt problem goRen Linux - Newbie 1 09-26-2004 12:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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