Script automatische update
Van MandrivaClub.NL Wiki
Voor het updaten van je Mandriva installatie moet je vaak meerdere stappen uitvoeren, voordat je er helemaal klaar mee bent. Dit script heeft deze stappen voor je geautomatiseerd. Dit script heb ik gevonden op http://www.linuxfordummies.org en naar het Nederlands vertaald, dit alles uiteraard met toestemming van de oorspronkelijke auteur. Jethro
Inhoud |
[bewerk] LET OP: NIET VOOR 2007!!
Let op! Dit script werkt helaas niet meer onder Mandriva 2007.0!! Bij deze laat ik weten dat het update script perfect werkt onder Mandriva 2007.0. Het werkt hier zonder enige problemen.
[bewerk] Werking
Sla het script op onder de naam 'updater' (of iets soortgelijks) en maak het uitvoerbaar door "chmod a+x updater". Dit script moet als root uitgevoerd worden, omdat de commando's die erin staan als root uitgevoerd dienen te worden. Het is mogelijk om hier sudo voor te gebruiken.
[bewerk] Het script
#!/bin/bash # Mandrake 'urpmi --auto-select' automatic update script, also known as 'Updater' # Originally written by briareus, modified by Hawkwind. # Remodified by Jethro into the Dutch Language. # # When this script is run, it will automatically update your current Mandrake install # as long as you have online sources set. Those can be found at: http://urpmi-addmedia.org # It basically replaces urpmi --auto-select and requires no user input what so ever for complete # updates to the system. # # Below are the various variables we set for use later in the script. # C='clear' E='echo' UU='urpmi.update' WG='--wget' U='urpmi' AS='--auto-select' A='--auto' DB='updatedb' UM='update-menus' # # Below is the actual script itself # $C $E "--> MANDRIVA'S AUTOMATISCHE ACTUALISATIE SCRIPT <--" $E "--> WE GAAN NU UW HDLIST ACTUALISEREN OP BASIS VAN UW HUIDIGE ONLINE BRONNEN <--" $UU $WG -a $E "--> WE GAAN NU, INDIEN AANWEZIG, EEN GEACTUALISEERDE VERSIE VAN URPMI ZELF INSTALLEREN <--" $U $WG $U $E "--> WE GAAN NU DE BESCHIKBARE GEACTUALISEERDE PAKKETTEN INSTALLEREN <--" $U $WG $AS $A $E "--> WE GAAN NU DE SLOCATE DATABASE ACTUALISEREN <--" $DB $E "--> WE GAAN NU DE MENUS ACTUALISEREN <--" $UM $E "--> UW MANDRIVA INSTALLATIE IS NU ZO GEACTUALISEERD MOGELIJK <--" $E "--> OP BASIS VAN DE ONLINE BRONNEN DIE U HEEFT GESPECIFICEERD VIA http://urpmi-addmedia.org <--"
[bewerk] WAARSCHUWING
Er zijn altijd risico's verbonden aan het updaten van je systeem, zeker als je bepaalde bronnen (zoals plf of SoS) hebt ingesteld. Wees dus voorzichtig met updaten en doe dit met voorkeur alleen met officiele Mandriva bronnen.

