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:
...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.