Help - Search - Members - Calendar
Full Version: System Updates --> Script?
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
seantech
One of these coming days I will most probably be planting a MDK box at the office as a general file server etc.

In MDK control centre you can click update, select updates, dload updates and it installs them automatically. Now, I want to keep the ammount of work to a minimum so I have 2 options.
- I don't update at all.
- I find a way to have the MDK box update automatically (without using/starting XFree).

I can help my self with the first option, but I can't even talk about the second one. Is there any-one that has any experience with, or knows of any way to create some form of an automatic update.

Would be cool to get some feedback....


Sean.
tyme
check our urpmi's options.
CODE
man urpmi
one of them is urpmi --update but you also need to make sure that the hdlist is updated, which at this moment I can't remember how to do.
fuzzylizard
To update all sources type this in

CODE
urpmi.update -a


So, theoretically you could write a script that runs the above command first, checks its return value (assuming it has one) and if no errors then run the update command. I am not sure of the exact bash syntax, perhaps someone else can fill that in, or maybe they have a better suggestion.
tyme
garu, where aarree yooouuu?
anon
I think you would have to incorporate rsync in there somewhere, otherwise you would end up with all the updates. Nothing wrong with i guess, but there is often updates which i don't require, or updates for software i don't even have installed. You could end up with a over bloated system.
tyme
isn't urpmi --update only supposed to update the packages you have installed? *looks confused* that's what i thought, atleast...
anon
QUOTE
isn't urpmi --update only supposed to update the packages you have installed?  *looks confused*  that's what i thought, atleast...

Your right it does laugh.gif
Im always running cooker so for me doing that would be disasterious. I have to be very careful what i install or upgrade.
Back to the topic, found this
QUOTE
urpmi --auto-select

checks all configured resources for updated packages, lists them and asks if they should be installed. If you don't want to be asked, add the '--auto' option. This option is also convenient when you want  to RUN THE UPDATE AS A CRON JOB. Do not forget to run 'urpmi.update' to refresh the resource database.

You can put certain packages on 'hold', i.e. to be ignored by the update command. For this, add the archive names of these packages to the file '/etc/urpmi/skip.list'. For instance, to prevent 'urpmi --auto-select' from installing newer kernel or glibc packages:

kernel
glibc
Gowator
its meant to but ...

On the same theme I was planning on downloading the updates regualrly and then ruinning thm locally.

I installed2 Mdk 9.1's last week and had to download the updates twice since the rpm cache is automatically cleaned and i was to distracted to copy it halfway through ...


Same for all the patches etc. from texstar and plf...
what I want is to download em once to a server and then be able to locally add em but urpmi seems to wanna delete em everytime it installs.

Personally i find this stupid, who'd run a system with no access to the install files if anything goes wrong, the line goes down or whatever.

At the moment im in an untenable position of being in this situation ... it sucks big time... The point is i just want the ones I want on the server, so when I add something from the internet via urpmi I want it to keep the file. That way all my machines can be patched to the same level.

Anyone else do this ???
tyme
there's an option somewhere that you can use to tell urpmi to keep or delete files when you use urpmi to install them.

check man urpmi i believe it's in there somewhere, or if someone knows (i can't check-at work) i'm sure they could tell you.
ezroller
CODE
urpmi --noclean


that will leave the rpms in /var/cache/urpmi/rpms after you install them.
Gowator
Im at home now so i man'd
If i have any time later Ill write the scripts to do the updates to a local cache ...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.