summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/fi.po
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/po/fi.po')
-rw-r--r--perl-install/share/po/fi.po347
1 files changed, 224 insertions, 123 deletions
diff --git a/perl-install/share/po/fi.po b/perl-install/share/po/fi.po
index 470038e74..a4e92ad92 100644
--- a/perl-install/share/po/fi.po
+++ b/perl-install/share/po/fi.po
@@ -11,8 +11,8 @@
msgid ""
msgstr ""
"Project-Id-Version: DrakX-fi - MDK Release 9.2\n"
-"POT-Creation-Date: 2003-05-20 12:43+0200\n"
-"PO-Revision-Date: 2003-05-18 21:31+0300\n"
+"POT-Creation-Date: 2003-05-31 11:34+0200\n"
+"PO-Revision-Date: 2003-05-27 23:36+0300\n"
"Last-Translator: Thomas Backlund <tmb@iki.fi>\n"
"Language-Team: Finnish <cooker-i18n@linux-mandrake.com>\n"
"MIME-Version: 1.0\n"
@@ -353,6 +353,11 @@ msgstr ""
msgid "Malaysia"
msgstr "Malesia"
+#: ../../standalone/drakedm:1
+#, c-format
+msgid "The change is done, do you want to restart the dm service ?"
+msgstr "Muutos on tehty, haluatko käynnistää dm palvelun uudelleen ?"
+
#: ../../keyboard.pm:1
#, c-format
msgid "Swiss (French layout)"
@@ -1993,9 +1998,9 @@ msgid "El Salvador"
msgstr "El Salvador"
#: ../../standalone/harddrake2:1
-#, fuzzy, c-format
+#, c-format
msgid "DVD"
-msgstr "DVD-ROM"
+msgstr "DVD"
#: ../../any.pm:1 ../../help.pm:1
#, c-format
@@ -3355,6 +3360,11 @@ msgstr "Käytä X-Window-järjestelmää"
msgid "hourly"
msgstr "tunneittain"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Right Shift key"
+msgstr "Oikea Shift näppäin"
+
#: ../../standalone/drakbackup:1
#, c-format
msgid " Successfuly Restored on %s "
@@ -3408,38 +3418,53 @@ msgstr ""
msgid "Configuring applications..."
msgstr "Asetetaan ohjelmia..."
-#: ../../network/netconnect.pm:1
-#, c-format
-msgid "Normal modem connection"
-msgstr "Tavallinen modeemiyhteys"
-
-#: ../../standalone/drakbackup:1 ../../standalone/drakfont:1
-#, c-format
-msgid "File Selection"
-msgstr "Tiedostojen valinta"
-
-#: ../../network/isdn.pm:1
+#: ../../printer/printerdrake.pm:1
#, c-format
msgid ""
-"Which ISDN configuration do you prefer?\n"
"\n"
-"* The Old configuration uses isdn4net. It contains powerful\n"
-" tools, but is tricky to configure, and not standard.\n"
+"Welcome to the Printer Setup Wizard\n"
"\n"
-"* The New configuration is easier to understand, more\n"
-" standard, but with less tools.\n"
+"This wizard will help you to install your printer(s) connected to this "
+"computer, connected directly to the network or to a remote Windows machine.\n"
+"\n"
+"Please plug in and turn on all printers connected to this machine so that it/"
+"they can be auto-detected. Also your network printer(s) and your Windows "
+"machines must be connected and turned on.\n"
+"\n"
+"Note that auto-detecting printers on the network takes longer than the auto-"
+"detection of only the printers connected to this machine. So turn off the "
+"auto-detection of network and/or Windows-hosted printers when you don't need "
+"it.\n"
"\n"
-"We recommand the light configuration.\n"
+" Click on \"Next\" when you are ready, and on \"Cancel\" if you do not want "
+"to set up your printer(s) now."
msgstr ""
-"Mitä ISDN-asetuksia haluat käyttää?\n"
"\n"
-"* Vanha asetusjärjestelmä käyttää isdn4net:iä. Se sisältää tehokkaat\n"
-" työkalut, mutta on vaikea asettaa, eikä se ole standardi.\n"
+"Tervetuloa Tulostimen asetusvelhoon\n"
"\n"
-"* Uusi asetusjärjestelmä on helpompi ymmärtää, enemmän käytössä,\n"
-" mutta se sisältää vähemmän työkaluja.\n"
+"Tämä velho auttaa sinua asentamaan paikallisesti liitetyn, suoraan verkkoon "
+"liitetyn tai Windows etäkoneeseen liitetyn tulostimen (tulostimia).\n"
"\n"
-"Suositus on käyttää uutta ja kevyempää asetusjärjestelmää.\n"
+"Jos sinulla on paikallisesti liitetty tulostin (tulostimia), varmista että "
+"se/ne on kytketty päälle jotta se/ne voidaan tunnistaa automaattisesti. Myös "
+"verkkotulostin (tulostimet) ja Windows kone(et) pitää olla päällä.\n"
+"\n"
+"Huomaa että tulostimen tunnistaminen verkosta kestää kauemmin kuin "
+"paikallisten tulostimien tunnistus. Eli poista verkkotulostimien ja/tai "
+"Windows-tulostimien tunnistus, jos et tarvitse niitä.\n"
+"\n"
+"Paina \"Seuraava\" kun haluat jatkaa tai \"Peruuta\" jos et halua asettaa "
+"tulostinta (tulostimia) nyt."
+
+#: ../../network/netconnect.pm:1
+#, c-format
+msgid "Normal modem connection"
+msgstr "Tavallinen modeemiyhteys"
+
+#: ../../standalone/drakbackup:1 ../../standalone/drakfont:1
+#, c-format
+msgid "File Selection"
+msgstr "Tiedostojen valinta"
#: ../../help.pm:1 ../../printer/cups.pm:1 ../../printer/data.pm:1
#, c-format
@@ -4156,6 +4181,11 @@ msgstr "Kuvanlukija"
msgid "Warning: testing this graphic card may freeze your computer"
msgstr "Varoitus: näytönohjaimesi testaaminen voi jumiuttaa tietokoneen"
+#: ../../standalone/drakconnect:1
+#, c-format
+msgid "Bad Ip"
+msgstr "Virheellinen lp"
+
#: ../../any.pm:1
#, c-format
msgid ""
@@ -5035,15 +5065,6 @@ msgstr ""
msgid "Floppy format"
msgstr "Levykkeen muoto"
-#: ../../standalone/harddrake2:1
-#, c-format
-msgid ""
-"the WP flag in the CR0 register enforce write proctection at the memory page "
-"level, thus enabling the processor to prevent kernel accesses)"
-msgstr ""
-"WP lipuke rekisterissä CD0 pakottaa kirjoitussuojan muistisivun tasolla, "
-"jolloin sallitaan prosessoria estää ytimen käyttöä"
-
#: ../../standalone/drakfont:1
#, c-format
msgid "Generic Printers"
@@ -5146,11 +5167,6 @@ msgstr "Liitetään osiota %s"
msgid "User name"
msgstr "Käyttäjätunnus"
-#: ../../network/isdn.pm:1
-#, c-format
-msgid "New configuration (isdn-light)"
-msgstr "Uusi kokoonpano (isdn-kevyt)"
-
#: ../../standalone/drakbug:1
#, c-format
msgid "Userdrake"
@@ -5590,9 +5606,9 @@ msgid "Configuring scripts, installing software, starting servers..."
msgstr "Asetan komentotiedostot, asennan ohjelmistot, käynnistän palvelimet..."
#: ../../printer/printerdrake.pm:1
-#, fuzzy, c-format
+#, c-format
msgid "Printer on parallel port #%s"
-msgstr "Tulostin rinnakkaisportissa \\#%s"
+msgstr "Tulostin rinnakkaisportissa #%s"
#: ../../standalone/drakbackup:1
#, c-format
@@ -5630,9 +5646,9 @@ msgstr ""
"Ota käyttöön / poista käytöstä libsafe jos se löytyy järjestelmästä."
#: ../../printer/printerdrake.pm:1
-#, fuzzy, c-format
+#, c-format
msgid "USB printer #%s"
-msgstr "USB-tulostin \\#%s"
+msgstr "USB-tulostin #%s"
#: ../../standalone/drakTermServ:1
#, c-format
@@ -5894,6 +5910,11 @@ msgstr ""
"\n"
"Löytyy yksi tuntematon tulostin joka on kytketty suoraan koneeseesi"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Right Control key"
+msgstr "Oikea Control näppäin"
+
#: ../../lang.pm:1
#, c-format
msgid "Zambia"
@@ -5929,11 +5950,6 @@ msgstr "Tsekin tasavalta"
msgid "Egypt"
msgstr "Egypti"
-#: ../../network/isdn.pm:1
-#, c-format
-msgid "Old configuration (isdn4net)"
-msgstr "Vanha kokoonpano (isdn4net)"
-
#: ../../help.pm:1 ../../install_steps_interactive.pm:1
#, c-format
msgid "Sound card"
@@ -5962,14 +5978,13 @@ msgid "Suppress Temporary Files"
msgstr "Poista väliaikaistiedostot"
#: ../../network/netconnect.pm:1
-#, fuzzy, c-format
+#, c-format
msgid ""
"Congratulations, the network and Internet configuration is finished.\n"
"\n"
msgstr ""
"Onnittelut, verkko- ja Internetyhteyksien asetus on valmis.\n"
"\n"
-"Asetukset otetaan nyt käyttöön järjestelmässä.\n"
#: ../../diskdrake/interactive.pm:1
#, c-format
@@ -6799,6 +6814,11 @@ msgstr "Valitse poistettava profiili:"
msgid "Local measure"
msgstr "Paikallinen mitta"
+#: ../../network/network.pm:1
+#, c-format
+msgid "Warning : IP address %s is usually reserved !"
+msgstr "Varoitus: IP osoite %s on yleensä varattu !"
+
#: ../../mouse.pm:1
#, c-format
msgid "busmouse"
@@ -6829,13 +6849,13 @@ msgstr ""
#: ../../lang.pm:1
#, c-format
-msgid "Benin"
-msgstr "Benin"
+msgid "Uruguay"
+msgstr "Uruguay"
#: ../../lang.pm:1
#, c-format
-msgid "Uruguay"
-msgstr "Uruguay"
+msgid "Benin"
+msgstr "Benin"
#: ../../standalone/drakperm:1
#, c-format
@@ -6895,45 +6915,6 @@ msgstr "Bangladesh"
msgid "Japan (cable)"
msgstr "Japani (kaapeli)"
-#: ../../printer/printerdrake.pm:1
-#, c-format
-msgid ""
-"\n"
-"Welcome to the Printer Setup Wizard\n"
-"\n"
-"This wizard will help you to install your printer(s) connected to this "
-"computer, connected directly to the network or to a remote Windows machine.\n"
-"\n"
-"If you have printer(s) connected to this machine, Please plug it/them in on "
-"this computer and turn it/them on so that it/they can be auto-detected. Also "
-"your network printer(s) and your Windows machines must be connected and "
-"turned on.\n"
-"\n"
-"Note that auto-detecting printers on the network takes longer than the auto-"
-"detection of only the printers connected to this machine. So turn off the "
-"auto-detection of network and/or Windows-hosted printers when you don't need "
-"it.\n"
-"\n"
-" Click on \"Next\" when you are ready, and on \"Cancel\" if you do not want "
-"to set up your printer(s) now."
-msgstr ""
-"\n"
-"Tervetuloa Tulostimen asetusvelhoon\n"
-"\n"
-"Tämä velho auttaa sinua asentamaan paikallisesti liitetyn, suoraan verkkoon "
-"liitetyn tai Windows etäkoneeseen liitetyn tulostimen (tulostimia).\n"
-"\n"
-"Jos sinulla on paikallisesti liitetty tulostin (tulostimia), varmista että "
-"se/ne on kytketty päälle jotta se/ne voidaan tunnistaa automaattisesti. Myös "
-"verkkotulostin (tulostimet) ja Windows kone(et) pitää olla päällä.\n"
-"\n"
-"Huomaa että tulostimen tunnistaminen verkosta kestää kauemmin kuin "
-"paikallisten tulostimien tunnistus. Eli poista verkkotulostimien ja/tai "
-"Windows-tulostimien tunnistus, jos et tarvitse niitä.\n"
-"\n"
-"Paina \"Seuraava\" kun haluat jatkaa tai \"Peruuta\" jos et halua asettaa "
-"tulostinta (tulostimia) nyt."
-
#: ../../standalone/drakfont:1
#, c-format
msgid "Initial tests"
@@ -7757,6 +7738,17 @@ msgstr ""
msgid "Printer default settings"
msgstr "Tulostimen oletusasetuksia"
+#: ../../standalone/harddrake2:1
+#, c-format
+msgid ""
+"the WP flag in the CR0 register of the cpu enforce write proctection at the "
+"memory page level, thus enabling the processor to prevent unchecked kernel "
+"accesses to user memory (aka this is a bug guard)"
+msgstr ""
+"WP lipuke rekisterissä CR0 pakottaa kirjoitussuojan muistisivun tasolla, "
+"jolloin sallitaan prosessorin estää tarkistamattomat ytimen käyttäjämuistin "
+"käytöt (eli tämä on virhesuoja)"
+
#: ../../mouse.pm:1
#, c-format
msgid "Generic PS2 Wheel Mouse"
@@ -8655,8 +8647,8 @@ msgid "Button `%s': %s"
msgstr "Painike '%s': %s"
#: ../../any.pm:1 ../../interactive.pm:1 ../../harddrake/sound.pm:1
-#: ../../standalone/drakxtv:1 ../../standalone/harddrake2:1
-#: ../../standalone/service_harddrake:1
+#: ../../standalone/drakbug:1 ../../standalone/drakxtv:1
+#: ../../standalone/harddrake2:1 ../../standalone/service_harddrake:1
#, c-format
msgid "Please wait"
msgstr "Odota hetki"
@@ -8874,6 +8866,11 @@ msgid ""
msgstr ""
"Vaihtoehtoisesti voit syöttää laitteen tai tiedoston nimen syöteriville"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Russian (Phonetic)"
+msgstr "Venäjä (Foneettinen)"
+
#: ../../standalone/drakTermServ:1
#, c-format
msgid "dhcpd Config..."
@@ -10075,6 +10072,11 @@ msgstr "prosessorin numero"
msgid "Hardware clock set to GMT"
msgstr "Laitteistokello asetettu GMT-aikaan"
+#: ../../network/isdn.pm:1
+#, fuzzy, c-format
+msgid "Do you want to start a new configuration ?"
+msgstr "Haluatko kokeilla asetuksia?"
+
#: ../../diskdrake/interactive.pm:1
#, c-format
msgid "Give a file name"
@@ -10091,9 +10093,9 @@ msgid "Change Cd-Rom"
msgstr "Vaihda CD-levyä"
#: ../../network/netconnect.pm:1
-#, fuzzy, c-format
+#, c-format
msgid "Configuration is complete, do you want to apply settings ?"
-msgstr "Mitä versiota XFree-palvelimesta haluat käyttää?"
+msgstr "Asetukset ovat tehty, haluatko ottaa ne käyttöön ?"
#: ../../lang.pm:1
#, c-format
@@ -10504,7 +10506,8 @@ msgstr "Poista asennettujen kirjasimien valinta"
#: ../../standalone/drakboot:1 ../../standalone/drakconnect:1
#: ../../standalone/drakfloppy:1 ../../standalone/drakfont:1
#: ../../standalone/drakgw:1 ../../standalone/draksec:1
-#: ../../standalone/logdrake:1 ../../standalone/net_monitor:1
+#: ../../standalone/logdrake:1 ../../standalone/mousedrake:1
+#: ../../standalone/net_monitor:1
#, c-format
msgid "Cancel"
msgstr "Peruuta"
@@ -10639,6 +10642,11 @@ msgstr "US näppäimistö (kansainvälinen)"
msgid "Not installed"
msgstr "Ei asennettu"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Both Alt keys simultaneously"
+msgstr "Molemmat Alt näppäimet samanaikaisesti"
+
#: ../../network/netconnect.pm:1
#, c-format
msgid "LAN connection"
@@ -10728,11 +10736,6 @@ msgstr ""
msgid "\t-Network by FTP.\n"
msgstr "\t-Verkkoon käyttäen FTP.\n"
-#: ../../keyboard.pm:1
-#, c-format
-msgid "Russian (Yawerty)"
-msgstr "Venäjä (Yawerty)"
-
#: ../../printer/printerdrake.pm:1
#, c-format
msgid "You must enter a device or file name!"
@@ -11485,6 +11488,11 @@ msgstr "Et voi poistaa tämän paketin valintaa. Paketti pitää päivittää."
msgid "Loading from floppy"
msgstr "Ladataan levykkeeltä"
+#: ../../standalone/mousedrake:1
+#, fuzzy, c-format
+msgid "Mouse test"
+msgstr "Mouse Systems"
+
#: ../../standalone/drakperm:1
#, c-format
msgid ""
@@ -11588,9 +11596,9 @@ msgid "Change type"
msgstr "Muuta tyyppiä"
#: ../../printer/main.pm:1 ../../printer/printerdrake.pm:1
-#, fuzzy, c-format
+#, c-format
msgid ", USB printer #%s"
-msgstr ", USB tulostin \\#%s"
+msgstr ", USB tulostin #%s"
#: ../../any.pm:1
#, c-format
@@ -12315,7 +12323,7 @@ msgstr "Yhtäkään TV-korttia ei löydetty."
#: ../../Xconfig/main.pm:1 ../../diskdrake/dav.pm:1
#: ../../diskdrake/interactive.pm:1 ../../diskdrake/removable.pm:1
-#: ../../diskdrake/smbnfs_gtk.pm:1
+#: ../../diskdrake/smbnfs_gtk.pm:1 ../../standalone/harddrake2:1
#, c-format
msgid "Options"
msgstr "Optiot"
@@ -12959,6 +12967,11 @@ msgstr "Loopback tiedostonimi: "
msgid "DNS server address should be in format 1.2.3.4"
msgstr "DNS palvelimen osoite pitää olla muotoa 1.2.3.4"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Left Control key"
+msgstr "Vasen Control näppäin"
+
#: ../../lang.pm:1
#, c-format
msgid "Serbia"
@@ -13797,6 +13810,11 @@ msgstr ""
"\n"
"Ota käyttöön / poista käytöstä msec turvallisuustarkistukset joka tunti."
+#: ../../lang.pm:1
+#, c-format
+msgid "Uganda"
+msgstr "Uganda"
+
#: ../../standalone/drakfont:1
#, c-format
msgid "%s fonts conversion"
@@ -13807,11 +13825,6 @@ msgstr "%s kirjasinten muunnos"
msgid "the type of bus on which the mouse is connected"
msgstr "Väylätyyppi johon hiiri on liitetty"
-#: ../../lang.pm:1
-#, c-format
-msgid "Uganda"
-msgstr "Uganda"
-
#: ../../security/help.pm:1
#, c-format
msgid ""
@@ -14237,6 +14250,11 @@ msgstr "\tVarmuuskopiot käyttävät: tar ja gzip\n"
msgid "2 MB"
msgstr "2 Mt"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Both Control keys simultaneously"
+msgstr "Molemmat Control näppäimet samanaikaisesti"
+
#: ../../standalone.pm:1
#, c-format
msgid ""
@@ -14287,9 +14305,9 @@ msgstr ""
"on 2.46 GHz) tai sinun pitää lisätä riittävästi '0' (nollia) loppuun."
#: ../../printer/main.pm:1
-#, fuzzy, c-format
+#, c-format
msgid ", multi-function device on parallel port #%s"
-msgstr ", monikäyttölaite rinnakkaisportissa \\#%s"
+msgstr ", monikäyttölaite rinnakkaisportissa #%s"
#: ../../mouse.pm:1
#, c-format
@@ -15082,6 +15100,11 @@ msgstr "poista"
msgid "here if no."
msgstr "tähän jos et ole."
+#: ../../standalone/harddrake2:1
+#, c-format
+msgid "help"
+msgstr "apua"
+
#: ../../network/network.pm:1
#, c-format
msgid "DHCP host name"
@@ -15240,6 +15263,7 @@ msgstr "Filippiinit"
#: ../../Xconfig/resolution_and_depth.pm:1 ../../interactive/http.pm:1
#: ../../interactive/newt.pm:1 ../../interactive/stdio.pm:1
#: ../../standalone/drakbackup:1 ../../standalone/draksec:1
+#: ../../standalone/mousedrake:1
#, c-format
msgid "Ok"
msgstr "OK"
@@ -15284,6 +15308,33 @@ msgstr ""
"tarvitsee tehdä tämä vain mikäli palvelimet eivät lähetä tulostintietojaan "
"paikallisverkkoon."
+#: ../../printer/printerdrake.pm:1
+#, c-format
+msgid ""
+"\n"
+"Welcome to the Printer Setup Wizard\n"
+"\n"
+"This wizard will help you to install your printer(s) connected to this "
+"computer.\n"
+"\n"
+"Please plug in and turn on all printers connected to this machine so that it/"
+"they can be auto-detected.\n"
+"\n"
+" Click on \"Next\" when you are ready, and on \"Cancel\" if you do not want "
+"to set up your printer(s) now."
+msgstr ""
+"\n"
+"Tervetuloa Tulostimen asetusvelhoon\n"
+"\n"
+"Tämä velho auttaa sinua asentamaan paikallisesti liitetyn tulostimen "
+"(tulostimia).\n"
+"\n"
+"Jos sinulla on paikallisesti liitetty tulostin (tulostimia), varmista että "
+"se/ne on kytketty päälle jotta se/ne voidaan tunnistaa automaattisesti.\n"
+"\n"
+"Paina \"Seuraava\" kun haluat jatkaa tai \"Peruuta\" jos et halua asettaa "
+"tulostinta (tulostimia) nyt."
+
#: ../../standalone/drakbackup:1
#, c-format
msgid "Restore From Catalog"
@@ -15736,8 +15787,9 @@ msgstr ", tulostin \"%s\" palvelimella \"%s\""
#: ../../install_steps.pm:1 ../../diskdrake/dav.pm:1
#: ../../diskdrake/hd_gtk.pm:1 ../../diskdrake/interactive.pm:1
#: ../../diskdrake/smbnfs_gtk.pm:1 ../../interactive/http.pm:1
-#: ../../standalone/drakboot:1 ../../standalone/drakfloppy:1
-#: ../../standalone/drakfont:1 ../../standalone/draksplash:1
+#: ../../standalone/drakboot:1 ../../standalone/drakbug:1
+#: ../../standalone/drakfloppy:1 ../../standalone/drakfont:1
+#: ../../standalone/draksplash:1
#, c-format
msgid "Error"
msgstr "Virhe"
@@ -16713,9 +16765,9 @@ msgid "Other MultiMedia devices"
msgstr "Muu multimedialaite"
#: ../../standalone/harddrake2:1
-#, fuzzy, c-format
+#, c-format
msgid "burner"
-msgstr "Tulostin"
+msgstr "poltin"
#: ../../printer/printerdrake.pm:1 ../../standalone/scannerdrake:1
#, c-format
@@ -17406,6 +17458,11 @@ msgstr "Luo käynnistyslevyke"
msgid "Solomon Islands"
msgstr "Salomonsaaret"
+#: ../../standalone/mousedrake:1
+#, fuzzy, c-format
+msgid "Please test your mouse:"
+msgstr "Testaa hiiri"
+
#: ../../modules/interactive.pm:1
#, c-format
msgid "(module %s)"
@@ -17506,9 +17563,9 @@ msgid "(already added %s)"
msgstr "(lisätty jo: %s)"
#: ../../any.pm:1
-#, fuzzy, c-format
+#, c-format
msgid "Bootloader installation in progress"
-msgstr "Käyttöjärjestelmän lataajan asennus"
+msgstr "Käyttöjärjestelmän lataajan asennus käynnissä"
#: ../../printer/main.pm:1
#, c-format
@@ -17945,9 +18002,9 @@ msgid "Restore all backups"
msgstr "Palauta kaikki varmuuskopiot"
#: ../../printer/main.pm:1 ../../printer/printerdrake.pm:1
-#, fuzzy, c-format
+#, c-format
msgid " on parallel port #%s"
-msgstr " rinnakkaisliitännässä \\#%s"
+msgstr " rinnakkaisliitännässä #%s"
#: ../../security/help.pm:1
#, c-format
@@ -18066,6 +18123,11 @@ msgstr "Useita"
msgid "Zip"
msgstr "Zip"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Left Alt key"
+msgstr "Oikea Alt näppäin"
+
#: ../../printer/printerdrake.pm:1
#, c-format
msgid ""
@@ -18639,6 +18701,11 @@ msgstr "Hyväksy käyttäjä"
msgid "Server"
msgstr "Palvelin"
+#: ../../keyboard.pm:1
+#, c-format
+msgid "Left Shift key"
+msgstr "Vasen Shift näppäin"
+
#: ../../interactive/stdio.pm:1
#, c-format
msgid "Bad choice, try again\n"
@@ -19989,6 +20056,40 @@ msgstr ""
"Valikoima työkaluja sähköpostin ja uutisryhmien lukemiseen sekä Internetissä "
"surffailuun"
+#~ msgid ""
+#~ "Which ISDN configuration do you prefer?\n"
+#~ "\n"
+#~ "* The Old configuration uses isdn4net. It contains powerful\n"
+#~ " tools, but is tricky to configure, and not standard.\n"
+#~ "\n"
+#~ "* The New configuration is easier to understand, more\n"
+#~ " standard, but with less tools.\n"
+#~ "\n"
+#~ "We recommand the light configuration.\n"
+#~ msgstr ""
+#~ "Mitä ISDN-asetuksia haluat käyttää?\n"
+#~ "\n"
+#~ "* Vanha asetusjärjestelmä käyttää isdn4net:iä. Se sisältää tehokkaat\n"
+#~ " työkalut, mutta on vaikea asettaa, eikä se ole standardi.\n"
+#~ "\n"
+#~ "* Uusi asetusjärjestelmä on helpompi ymmärtää, enemmän käytössä,\n"
+#~ " mutta se sisältää vähemmän työkaluja.\n"
+#~ "\n"
+#~ "Suositus on käyttää uutta ja kevyempää asetusjärjestelmää.\n"
+
+#~ msgid "New configuration (isdn-light)"
+#~ msgstr "Uusi kokoonpano (isdn-kevyt)"
+
+#~ msgid "Old configuration (isdn4net)"
+#~ msgstr "Vanha kokoonpano (isdn4net)"
+
+#~ msgid ""
+#~ "the WP flag in the CR0 register enforce write proctection at the memory "
+#~ "page level, thus enabling the processor to prevent kernel accesses)"
+#~ msgstr ""
+#~ "WP lipuke rekisterissä CD0 pakottaa kirjoitussuojan muistisivun tasolla, "
+#~ "jolloin sallitaan prosessoria estää ytimen käyttöä"
+
#~ msgid "Internet connection & configuration"
#~ msgstr "Internetyhteyden muodostus ja asetukset"
a> 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
package bootloader; # $Id$

use diagnostics;
use strict;
use vars qw(%vga_modes);

#-######################################################################################
#- misc imports
#-######################################################################################
use common;
use partition_table qw(:types);
use log;
use any;
use fsedit;
use devices;
use loopback;
use detect_devices;
use partition_table::raw;
use run_program;
use modules;


#-#####################################################################################
#- Functions
#-#####################################################################################
my $vmlinuz_regexp = 'vmlinuz';
my $decompose_vmlinuz_name = qr/((?:$vmlinuz_regexp).*)-(\d+\.\d+.*)/;

sub expand_vmlinuz_symlink {
    my ($vmlinuz) = @_;
    my $f = $::prefix . ($vmlinuz =~ m!^/! ? $vmlinuz : "/boot/$vmlinuz");
    -l $f ? readlink($f) : $vmlinuz;
}

sub installed_vmlinuz_raw() { grep { /^($vmlinuz_regexp)/ } all("$::prefix/boot") }
sub installed_vmlinuz() { grep { ! -l "$::prefix/boot/$_" } installed_vmlinuz_raw() }
sub vmlinuz2version {
    my ($vmlinuz) = @_;
    expand_vmlinuz_symlink($vmlinuz) =~ /$decompose_vmlinuz_name/ && $2;
}
sub vmlinuz2basename {
    my ($vmlinuz) = @_;
    expand_vmlinuz_symlink($vmlinuz) =~ /$decompose_vmlinuz_name/ && $1;
}
sub basename2initrd_basename {
    my ($basename) = @_;
    $basename =~ s!vmlinuz-?!!; #- here we don't use $vmlinuz_regexp since we explictly want to keep all that is not "vmlinuz"
    'initrd' . ($basename ? "-$basename" : '');    
}
sub kernel_str2vmlinuz_long {
    my ($kernel) = @_;
    $kernel->{basename} . '-' . $kernel->{version};
}
sub kernel_str2initrd_long {
    my ($kernel) = @_;
    basename2initrd_basename($kernel->{basename}) . '-' . $kernel->{version} . '.img';
}
sub kernel_str2vmlinuz_short {
    my ($kernel) = @_;
    if ($kernel->{use_long_name}) {
	kernel_str2vmlinuz_long($kernel);
    } else {
	my $ext = $kernel->{ext} ? "-$kernel->{ext}" : '';
	$kernel->{basename} . $ext;
    }
}
sub kernel_str2initrd_short {
    my ($kernel) = @_;
    if ($kernel->{use_long_name}) {
	kernel_str2initrd_long($kernel);
    } else {
	my $ext = $kernel->{ext} ? "-$kernel->{ext}" : '';
	basename2initrd_basename($kernel->{basename}) . $ext . '.img';
    }
}

sub vmlinuz2kernel_str {
    my ($vmlinuz) = @_;
    my ($basename, $version) = expand_vmlinuz_symlink($vmlinuz) =~ /$decompose_vmlinuz_name/ or return;
    { 
	basename => $basename,
	version => $version, 
	$version =~ /(.*mdk)-?(.*)/ ? (ext => $2, version_no_ext => $1) : (version_no_ext => $version),
    };
}
sub kernel_str2label {
    my ($kernel, $o_use_long_name) = @_;
    $o_use_long_name || $kernel->{use_long_name} ?
      sanitize_ver("linux-$kernel->{version}") : 
        $kernel->{ext} ? "linux$kernel->{ext}" : 'linux';
}

sub get {
    my ($vmlinuz, $bootloader) = @_;
    $_->{kernel_or_dev} && $_->{kernel_or_dev} eq $vmlinuz and return $_ foreach @{$bootloader->{entries}};
    undef;
}
sub get_label {
    my ($label, $bootloader) = @_;
    $_->{label} && lc(make_label_lilo_compatible($_->{label})) eq lc(make_label_lilo_compatible($label)) and return $_ foreach @{$bootloader->{entries}};
    undef;
}

sub mkinitrd {
    my ($kernel_version, $entry) = @_;

    my $initrd = $entry->{initrd};
    $::testing || -e "$::prefix/$initrd" and return 1;

    my $loop_boot = loopback::prepare_boot();

    modules::load('loop');
    my @options = (
		   "-v", "-f", $initrd, "--ifneeded", $kernel_version, 
		   if_($entry->{initrd_options}, split(' ', $entry->{initrd_options})),
		  );
    if (!run_program::rooted($::prefix, 'mkinitrd', @options)) {
	unlink("$::prefix/$initrd");
	die "mkinitrd failed";
    }
    add_boot_splash($entry->{initrd}, $entry->{vga});

    loopback::save_boot($loop_boot);

    -e "$::prefix/$initrd";
}

sub make_boot_splash {
    my ($initrd, $vga) = @_;

    if ($vga) {
	add_boot_splash($initrd, $vga);
    } else {
	remove_boot_splash($initrd);
    }
}
sub remove_boot_splash {
    my ($initrd) = @_;
    run_program::rooted($::prefix, '/usr/share/bootsplash/scripts/remove-boot-splash', $initrd);
}
sub add_boot_splash {
    my ($initrd, $vga) = @_;

    $vga or return;

    require Xconfig::resolution_and_depth;
    if (my $res = Xconfig::resolution_and_depth::from_bios($vga)) {
	run_program::rooted($::prefix, '/usr/share/bootsplash/scripts/make-boot-splash', $initrd, $res->{X});
    } else {
	log::l("unknown vga bios mode $vga");
    }
}

sub read {
    my ($fstab) = @_;
    my @methods = method_choices_raw();
    foreach my $main_method (uniq(map { main_method($_) } @methods)) {
	my $f = $bootloader::{"read_$main_method"} or die "unknown bootloader method $main_method (read)";
	my $bootloader = $f->($fstab);
	my $type = partition_table::raw::typeOfMBR($bootloader->{boot});
	if ($type eq $main_method) {
	    my @prefered_entries = map { get_label($_, $bootloader) } $bootloader->{default}, 'linux';

	    if (my $default = find { $_ && $_->{append} } (@prefered_entries, @{$bootloader->{entries}})) {
		$bootloader->{default_vga} = $default->{vga};
		$bootloader->{perImageAppend} ||= $default->{append};
	    }
	    return $bootloader;
	}
    }
}

sub read_grub {
    my ($fstab) = @_;
    my $global = 1;
    my ($e, %b);

    my $grub2dev = read_grub_device_map();

    my $menu_lst_file = "$::prefix/boot/grub/menu.lst";
    -e $menu_lst_file or return;

    foreach (cat_($menu_lst_file)) {
        chomp;
	s/^\s*//; s/\s*$//;
        next if /^#/ || /^$/;
	my ($keyword, $v) = split(' ', $_, 2) or
	  warn qq(unknown line in /boot/grub/menu.lst: "$_"\n), next;

        if ($keyword eq 'title') {
            push @{$b{entries}}, $e = { label => $v };
            $global = 0;
        } elsif ($global) {
            $b{$keyword} = $v eq '' ? 1 : grub2file($v, $grub2dev, $fstab);
        } else {
            if ($keyword eq 'kernel') {
                $e->{type} = 'image';
                (my $kernel, $e->{append}) = split(' ', $v, 2);
		$e->{root} = $1 if $e->{append} =~ s/root=(\S*)\s*//;
		$e->{kernel_or_dev} = grub2file($kernel, $grub2dev, $fstab);
            } elsif ($keyword eq 'root') {
                $e->{type} = 'other';
		if ($v =~ /,/) {
		    $e->{table} = grub2dev($v, $grub2dev, 1);
		} else {
		    $e->{unsafe} = 1;
		}
                $e->{kernel_or_dev} = grub2dev($v, $grub2dev);
                $e->{append} = "";
            } elsif ($keyword eq 'initrd') {
                $e->{initrd} = grub2file($v, $grub2dev, $fstab);
            }
        }
    }
    foreach (cat_("$::prefix/boot/grub/install.sh")) {
        $b{boot} = grub2dev($1, $grub2dev) if /\s+d\s+(\(.*?\))/;
    }

    #- sanitize
    foreach (@{$b{entries}}) {
	my ($vga, $other) = partition { /^vga=/ } split(' ', $_->{append});
	if (@$vga) {
	    $_->{vga} = $vga->[0] =~ /vga=(.*)/ && $1;
	    $_->{append} = join(' ', @$other);
	}
    }

    $b{nowarn} = 1;
    # handle broken installkernel -r:
    $b{default} = min($b{default}, scalar(@{$b{entries}}) - 1);
    $b{default} = $b{entries}[$b{default}]{label};
    $b{method} = 'grub';

    \%b;
}

sub read_yaboot() { &read_lilo }
sub read_lilo() {
    my $file = sprintf("$::prefix/etc/%s.conf", arch() =~ /ppc/ ? 'yaboot' : 'lilo');
    my $global = 1;
    my ($e, $v);
    my %b;
    -e $file or return;
    foreach (cat_($file)) {
	next if /^\s*#/ || /^\s*$/;
	($_, $v) = /^\s*([^=\s]+)\s*(?:=\s*(.*?))?\s*$/ or log::l("unknown line in $file: $_"), next;

	if (/^(image|other)$/) {
	    if (arch() =~ /ppc/) {
		$v =~ s/hd:\d+,//g;
	    }   
	    push @{$b{entries}}, $e = { type => $_, kernel_or_dev => $v };
	    $global = 0;
	} elsif ($global) {
	    if ($_ eq 'disk' && $v =~ /(\S+)\s+bios\s*=\s*(\S+)/) {
		$b{bios}{$1} = $2;
	    } elsif ($_ eq 'bios') {
		$b{bios}{$b{disk}} = $v;
	    } elsif ($_ eq 'init-message') {
		$v =~ s/\\n//g; 
		$v =~ s/"//g;
		$b{'init-message'} = $v;
	    } else {
		$b{$_} = $v eq '' ? 1 : $v;
	    }
	} else {
	    if ((/map-drive/ .. /to/) && /to/) {
		$e->{mapdrive}{$e->{'map-drive'}} = $v;
	    } else {
		if (arch() =~ /ppc/) {
		    $v =~ s/hd:\d+,//g;
		    $v =~ s/"//g;
		}
		$e->{$_} = $v || 1 if !member($_, 'read-only');
	    }
	}
    }
    if (arch() !~ /ppc/) {
	delete $b{timeout} unless $b{prompt};
	sub remove_quotes_and_spaces {
	    local ($_) = @_;
	    s/^\s*//; s/\s*$//;
	    s/^"(.*?)"$/$1/;
	    $_;
	}
	$_->{append} = remove_quotes_and_spaces($_->{append}) foreach \%b, @{$b{entries}};
	$_->{label}  = remove_quotes_and_spaces($_->{label})  foreach @{$b{entries}};
	$b{default} = remove_quotes_and_spaces($b{default}) if $b{default};
	$b{timeout} = $b{timeout} / 10 if $b{timeout};
	$b{method} = 'lilo-' . (member($b{install}, 'text', 'menu', 'graphic') ? $b{install} : 'graphic');
	delete $b{message};
    }

    #- cleanup duplicate labels & bad entries (in case file is corrupted)
    my %seen;
    @{$b{entries}} = 
	grep { !$seen{$_->{label}}++ }
	grep { $_->{type} ne 'image' || -e "$::prefix$_->{kernel_or_dev}" } @{$b{entries}};

    \%b;
}

sub suggest_onmbr {
    my ($hd) = @_;
    
    my ($onmbr, $unsafe) = (1, 1);

    if (my $type = partition_table::raw::typeOfMBR($hd->{device})) {
	if (member($type, qw(dos dummy empty))) {
	    $unsafe = 0;
	} elsif (!member($type, qw(lilo grub))) {
	    $onmbr = 0;
	}
	log::l("bootloader::suggest_onmbr: type $type, onmbr $onmbr, unsafe $unsafe");
    }
    ($onmbr, $unsafe);
}

sub same_entries {
    my ($a, $b) = @_;

    foreach (uniq(keys %$a, keys %$b)) {
	if ($_ eq 'label') {
	    next;
	} elsif ($_ eq 'append') {
	    next if join(' ', sort split(' ', $a->{$_})) eq join(' ', sort split(' ', $b->{$_}))
	} else {
	    next if $a->{$_} eq $b->{$_};

	    my ($inode_a, $inode_b) = map { (stat "$::prefix$_")[1] } ($a->{$_}, $b->{$_});
	    next if $inode_a && $inode_b && $inode_a == $inode_b;
	}

	log::l("entries $a->{label} don't have same $_: $a->{$_} ne $b->{$_}");
	return;
    }
    1;
}

sub add_entry {
    my ($bootloader, $v) = @_;

    my $to_add = $v;
    my $label = $v->{label};
    for (my $i = 0; $i < 10;) {
	my $conflicting = get_label($label, $bootloader);

	$to_add->{label} = $label;

	if ($conflicting) {
	    #- replacing $conflicting with $to_add
	    @{$bootloader->{entries}} = map { $_ == $conflicting ? $to_add : $_ } @{$bootloader->{entries}};
	} else {
	    #- we have found an unused label
	    push @{$bootloader->{entries}}, $to_add;
	}

	if (!$conflicting || same_entries($conflicting, $to_add)) {
	    log::l("current labels: " . join(" ", map { $_->{label} } @{$bootloader->{entries}}));
	    return $v;
	}
	$to_add = $conflicting;

	my $new_label = $v->{label} eq 'linux' && kernel_str2label(vmlinuz2kernel_str($to_add->{kernel_or_dev}), 'use_long_name');
	$label = $new_label && $label ne $new_label ? $new_label : 'old' . ($i++ ? $i : '') . "_$label";
    }
    die 'add_entry';
}

sub _do_the_symlink {
    my ($bootloader, $entry, $kind, $long_name) = @_;

    my $existing_link = readlink("$::prefix$entry->{$kind}");
    if ($existing_link && $existing_link eq $long_name) {
	#- nothing to do :)
	return;
    }

    #- the symlink is going to change! 
    #- replace all the {$kind} using this symlink to the real file
    my $old_long_name = $existing_link =~ m!^/! ? $existing_link : "/boot/$existing_link";
    if (-e "$::prefix$old_long_name") {
	foreach (@{$bootloader->{entries}}) {
	    if ($_->{$kind} eq $entry->{$kind}
		#- we don't modify existing failsafe or linux-nonfb unless we overwrite them
		&& ($_->{label} eq $entry->{label} || !member($_->{label}, 'failsafe', 'linux-nonfb'))) {
		log::l("replacing $_->{$kind} with $old_long_name for bootloader label $_->{labe}");
		$_->{$kind} = $old_long_name;
	    }
	}
    } else {
	log::l("ERROR: $entry->{$kind} points to $old_long_name which doesn't exist");
    }

    #- changing the symlink
    symlinkf($long_name, "$::prefix$entry->{$kind}")
      or cp_af("$::prefix/boot/$long_name", "$::prefix$entry->{$kind}");
}

sub add_kernel {
    my ($bootloader, $kernel_str, $v, $b_nolink, $b_no_initrd) = @_;

    add2hash($v,
	     {
	      type => 'image',
	      label => kernel_str2label($kernel_str),
	     });
    $v->{append} = normalize_append("$bootloader->{perImageAppend} $v->{append}");

    #- new versions of yaboot don't handle symlinks
    $b_nolink ||= arch() =~ /ppc/;

    $b_nolink ||= $kernel_str->{use_long_name};

    my $vmlinuz_long = kernel_str2vmlinuz_long($kernel_str);
    $v->{kernel_or_dev} = "/boot/$vmlinuz_long";
    -e "$::prefix$v->{kernel_or_dev}" or log::l("unable to find kernel image $::prefix$v->{kernel_or_dev}"), return;
    if (!$b_nolink) {
	$v->{kernel_or_dev} = '/boot/' . kernel_str2vmlinuz_short($kernel_str);
	_do_the_symlink($bootloader, $v, 'kernel_or_dev', $vmlinuz_long);
    }
    log::l("adding $v->{kernel_or_dev}");

    if (!$b_no_initrd) {
	my $initrd_long = kernel_str2initrd_long($kernel_str);
	$v->{initrd} = "/boot/$initrd_long";
	mkinitrd($kernel_str->{version}, $v) or undef $v->{initrd};
	if ($v->{initrd} && !$b_nolink) {
	    $v->{initrd} = '/boot/' . kernel_str2initrd_short($kernel_str);
	    _do_the_symlink($bootloader, $v, 'initrd', $initrd_long);
	}
    }

    add_entry($bootloader, $v);
}

sub duplicate_kernel_entry {
    my ($bootloader, $new_label) = @_;

    get_label($new_label, $bootloader) and return;

    my $entry = { %{ get_label('linux', $bootloader) }, label => $new_label };
    add_entry($bootloader, $entry);
}

sub unpack_append {
    my ($s) = @_;
    my @l = split(' ', $s);
    [ grep { !/=/ } @l ], [ map { if_(/(.*?)=(.*)/, [$1, $2]) } @l ];
}
sub pack_append {
    my ($simple, $dict) = @_;

    #- normalize
    $simple = [ reverse(uniq(reverse @$simple)) ];
    $dict = [ reverse(uniq_ { my ($k, $v) = @$_; $k eq 'mem' ? "$k=$v" : $k } reverse @$dict) ];

    join(' ', @$simple, map { "$_->[0]=$_->[1]" } @$dict);
}

sub normalize_append {
    my ($s) = @_;
    my ($simple, $dict) = unpack_append($s);
    pack_append($simple, $dict);
}

sub append__mem_is_memsize { $_[0] =~ /^\d+[kM]?$/i }

sub get_append {
    my ($b, $key) = @_;
    my ($simple, $dict) = unpack_append($b->{perImageAppend});
    if (member($key, @$simple)) {
	return 1;
    }
    my @l = map { $_->[1] } grep { $_->[0] eq $key } @$dict;

    #- suppose we want the memsize
    @l = grep { append__mem_is_memsize($_) } @l if $key eq 'mem';

    log::l("more than one $key in $b->{perImageAppend}") if @l > 1;
    $l[0];
}
sub modify_append {
    my ($b, $f) = @_;

    my @l = grep { $_->{type} eq 'image' && !($::isStandalone && $_->{label} eq 'failsafe') } @{$b->{entries}};

    foreach (\$b->{perImageAppend}, map { \$_->{append} } @l) {
	my ($simple, $dict) = unpack_append($$_);
	$f->($simple, $dict);
	$$_ = pack_append($simple, $dict);
	log::l("modify_append: $$_");
    }
}
sub remove_append_simple {
    my ($b, $key) = @_;
    modify_append($b, sub {
	my ($simple, $_dict) = @_;
	@$simple = grep { $_ ne $key } @$simple;
    });
}
sub set_append {
    my $has_val = @_ > 2;
    my ($b, $key, $val) = @_;

    modify_append($b, sub {
	my ($simple, $dict) = @_;
	if ($has_val) {
	    @$dict = grep { $_->[0] ne $key || $key eq 'mem' && append__mem_is_memsize($_->[1]) != append__mem_is_memsize($val) } @$dict;
	    push @$dict, [ $key, $val ] if !($val eq '' || $key eq 'mem' && !$val);
	} else {
	    @$simple = grep { $_ ne $key } @$simple;
	    push @$simple, $key;
	}
    });
}
sub may_append {
    my ($b, $key, $val) = @_;
    set_append($b, $key, $val) if !get_append($b, $key);
}

sub configure_entry {
    my ($entry) = @_;
    $entry->{type} eq 'image' or return;

    if (my $kernel_str = vmlinuz2kernel_str($entry->{kernel_or_dev})) {
	$entry->{initrd} ||= '/boot/' . kernel_str2initrd_short($kernel_str);
	mkinitrd($kernel_str->{version}, $entry) or undef $entry->{initrd};
    }
}

sub get_kernels_and_labels {
    my ($b_prefer_24) = @_;

    my @kernels = installed_vmlinuz();
    
    require pkgs;
    my @kernels_str = 
      sort { c::rpmvercmp($b->{version_no_ext}, $a->{version_no_ext}) } 
      grep { -d "$::prefix/lib/modules/$_->{version}" }
      map { vmlinuz2kernel_str($_) } @kernels;

    if ($b_prefer_24) {
	my ($kernel_24, $other) = partition { $_->{ext} eq '' && $_->{version} =~ /^\Q2.4/ } @kernels_str;
	@kernels_str = (@$kernel_24, @$other);
    }

    $kernels_str[0]{ext} = '';

    my %labels;
    foreach (@kernels_str) {
	if ($labels{$_->{ext}}) {
	    $_->{use_long_name} = 1;
	} else {
	    $labels{$_->{ext}} = 1;
	}
    }
    @kernels_str;
}

# sanitize_ver: long function when it could be shorter but we are sure
#		to catch everything and can be readable if we want to
#		add new scheme name.
# DUPLICATED from /usr/share/loader/common.pm
sub sanitize_ver {
    my ($string) = @_;

    my ($main_version, undef, $extraversion, $rest) = 
      $string =~ m!(\d+\.\d+\.\d+)(-((?:pre|rc)\d+))?(.*)!;

    if (my ($mdkver, $cpu, $nproc, $mem) = $rest =~ m|-(.+)-(.+)-(.+)-(.+)|) {
	$rest = "$cpu$nproc$mem-$mdkver";
    }

    my $return = "$main_version$extraversion$rest";

    $return =~ s|\.||g;
    $return =~ s|mdk||;
    $return =~ s|64GB|64G|;
    $return =~ s|4GB|4G|;
    $return =~ s|secure|sec|;
    $return =~ s|enterprise|ent|;

    $return;
}

sub suggest {
    my ($bootloader, $hds, %options) = @_;
    my $fstab = [ fsedit::get_fstab(@$hds) ];
    my $root_part = fsedit::get_root($fstab);
    my $root = '/dev/' . (isLoopback($root_part) ? 'loop7' : $root_part->{device});
    my $boot = fsedit::get_root($fstab, 'boot')->{device};
    #- PPC xfs module requires enlarged initrd
    my $xfsroot = isThisFs("xfs", $root_part);

    my ($onmbr, $unsafe) = $bootloader->{crushMbr} ? (1, 0) : suggest_onmbr($hds->[0]);
    add2hash_($bootloader, arch() =~ /ppc/ ?
	{
	 defaultos => "linux",
	 entries => [],
	 'init-message' => "Welcome to Mandrakelinux!",
	 delay => 30,	#- OpenFirmware delay
	 timeout => 50,
	 enableofboot => 1,
	 enablecdboot => 1,
	 useboot => $boot,
	 xfsroot => $xfsroot,
	} :
	{
	 bootUnsafe => $unsafe,
	 entries => [],
	 timeout => $onmbr && 10,
	 nowarn => 1,
	   if_(arch() !~ /ia64/,
	 boot => "/dev/" . ($onmbr ? $hds->[0]{device} : fsedit::get_root($fstab, 'boot')->{device}),
	 map => "/boot/map",
	 color => 'black/cyan yellow/cyan',
         ),
	});

    if (!$bootloader->{message} || $bootloader->{message} eq "1") {
	my $msg_en =
#-PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit)
N_("Welcome to the operating system chooser!

Choose an operating system from the list above or
wait for default boot.

");
	my $msg = translate($msg_en);
	#- use the english version if more than 20% of 8bits chars
	$msg = $msg_en if int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) > 0.2;
	$bootloader->{message} = $msg;
    }

    add2hash_($bootloader, { memsize => $1 }) if cat_("/proc/cmdline") =~ /\bmem=(\d+[KkMm]?)(?:\s.*)?$/;
    if (my ($s, $port, $speed) = cat_("/proc/cmdline") =~ /console=(ttyS(\d),(\d+)\S*)/) {
	log::l("serial console $s $port $speed");
	set_append($bootloader, 'console' => $s);
	any::set_login_serial_console($port, $speed);
    }

    #- add a restore entry if installation is done from disk, in order to allow redoing it.
    if (my $hd_install_path = any::hdInstallPath()) {
	my ($cmdline, $vga);
	if ($::restore && -e "/tmp/image/boot/vmlinuz" && -e "/tmp/image/boot/all.rdz" &&
	    ($cmdline = cat_("/tmp/image/boot/grub/menu.lst") =~ m|kernel \S+/boot/vmlinuz (.*)$|m)) {
	    #- cmdline should'n have any reference to vga=...
	    $cmdline =~ s/vga=(\S+)//g and $vga = $1;
	    log::l("copying kernel and stage1 install to $::prefix/boot/restore");
	    eval { mkdir "$::prefix/boot/restore";
		   cp_af("/tmp/image/boot/vmlinuz", "$::prefix/boot/restore/vmlinuz");
		   cp_af("/tmp/image/boot/all.rdz", "$::prefix/boot/restore/all.rdz") };
	    unless ($@) {
		log::l("adding a restore bootloader entry on $hd_install_path (remapped to $::prefix/boot/restore)");
		add_entry($bootloader, {
					type => 'image',
					label => 'restore',
					kernel_or_dev => "/boot/restore/vmlinuz",
					initrd => "/boot/restore/all.rdz",
					append => "$cmdline recovery", #- the restore entry is a recovery entry
					if_($vga, vga => $vga),
				       });
	    }
	} else {
	    log::l("no restore bootloader need to be used on $hd_install_path");
	}
    }

    my @kernels = get_kernels_and_labels() or die "no kernel installed";

    foreach my $kernel (@kernels) {
	add_kernel($bootloader, $kernel,
	       {
		root => $root,
		if_($options{vga_fb} && $kernel->{ext} eq '', vga => $options{vga_fb}), #- using framebuffer
		if_($options{vga_fb} && $options{quiet}, append => "splash=silent"),
	       });

	if ($options{vga_fb} && $kernel->{ext} eq '') {
	    add_kernel($bootloader, $kernel, { root => $root, label => 'linux-nonfb' });
	}
    }

    #- remove existing libsafe, don't care if the previous one was modified by the user?