View Single Post
Old 15-10-2005, 01:29 PM   #4 (permalink) Top
Anti-Trend
Nonconformist Geek
 
Anti-Trend's Avatar
 
Join Date: Oct 2003
Age: 27 Male
Posts: 4,884
Times Helpful: 538
Status: Offline

My Computer

Automatic Updates via urpmi

Using Mandriva's powerful urpmi tool, we will have Mandrake Linux perform a fully-automated update process every morning at around 04:00. This will be accomplished using a very simple cron job. If you do not have broadband, this method is not recommended for you. If you haven't already, read & follow "Adding & Removing Software and Repositories" before proceeding -- it is a critical step! After you've setup your urpmi repositories, start a terminal. Type the following to gain root privileges:
Code:
su - root
...after which you will be asked to enter your root password -- do so. Once you have root access, type:
Code:
vi /etc/cron.daily/myupdates.cron
In the new file you've just created, add the following: (i enters interactive mode in vi, for those who don't know)
Code:
#!/bin/sh
urpmi.update -a
urpmi --auto-select --auto
...and save the file. (:wq! for those who don't know vi well) Once you've got your new cron script successfully created, you must make it executable by the root user. As root, do the following:
Code:
chmod 754 /etc/cron.daily/myupdates.cron
Optional: If you want to have the system updated weekly instead of daily, simply move the cron script from /etc/cron.daily/ to /etc/cron.weekly/ by performing the following command (as root):
Code:
mv /etc/cron.daily/myupdates.cron /etc/cron.weekly/
As the French say, Viola! Now your system will update daily, appending logs of what's transpired to a file called /var/log/urpmi.log so you can check on what's changed should you desire to do so.

Send a message via ICQ to Anti-Trend Send a message via AIM to Anti-Trend