summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/po/af.po1
-rw-r--r--perl-install/standalone/po/am.po1
-rw-r--r--perl-install/standalone/po/ar.po1
-rw-r--r--perl-install/standalone/po/az.po1
-rw-r--r--perl-install/standalone/po/be.po1
-rw-r--r--perl-install/standalone/po/bg.po1
-rw-r--r--perl-install/standalone/po/bn.po1
-rw-r--r--perl-install/standalone/po/br.po1
-rw-r--r--perl-install/standalone/po/bs.po1
-rw-r--r--perl-install/standalone/po/ca.po1
-rw-r--r--perl-install/standalone/po/cs.po9
-rw-r--r--perl-install/standalone/po/cy.po1
-rw-r--r--perl-install/standalone/po/da.po1
-rw-r--r--perl-install/standalone/po/de.po1
-rw-r--r--perl-install/standalone/po/el.po15
-rw-r--r--perl-install/standalone/po/eo.po1
-rw-r--r--perl-install/standalone/po/es.po1
-rw-r--r--perl-install/standalone/po/et.po1
-rw-r--r--perl-install/standalone/po/eu.po1
-rw-r--r--perl-install/standalone/po/fa.po1
-rw-r--r--perl-install/standalone/po/fi.po1
-rw-r--r--perl-install/standalone/po/fr.po12
-rw-r--r--perl-install/standalone/po/fur.po1
-rw-r--r--perl-install/standalone/po/ga.po1
-rw-r--r--perl-install/standalone/po/gl.po1
-rw-r--r--perl-install/standalone/po/he.po1
-rw-r--r--perl-install/standalone/po/hi.po1
-rw-r--r--perl-install/standalone/po/hr.po5
-rw-r--r--perl-install/standalone/po/hu.po1
-rw-r--r--perl-install/standalone/po/id.po1
-rw-r--r--perl-install/standalone/po/is.po1
-rw-r--r--perl-install/standalone/po/it.po1
-rw-r--r--perl-install/standalone/po/ja.po1
-rw-r--r--perl-install/standalone/po/ko.po1
-rw-r--r--perl-install/standalone/po/ky.po1
-rw-r--r--perl-install/standalone/po/libDrakX-standalone.pot3
-rw-r--r--perl-install/standalone/po/lt.po1
-rw-r--r--perl-install/standalone/po/ltg.po1
-rw-r--r--perl-install/standalone/po/lv.po1
-rw-r--r--perl-install/standalone/po/mk.po1
-rw-r--r--perl-install/standalone/po/mn.po1
-rw-r--r--perl-install/standalone/po/ms.po1
-rw-r--r--perl-install/standalone/po/mt.po1
-rw-r--r--perl-install/standalone/po/nb.po5
-rw-r--r--perl-install/standalone/po/nl.po1
-rw-r--r--perl-install/standalone/po/nn.po8
-rw-r--r--perl-install/standalone/po/pa_IN.po1
-rw-r--r--perl-install/standalone/po/pl.po1
-rw-r--r--perl-install/standalone/po/pt.po5
-rw-r--r--perl-install/standalone/po/pt_BR.po1
-rw-r--r--perl-install/standalone/po/ro.po5
-rw-r--r--perl-install/standalone/po/ru.po1
-rw-r--r--perl-install/standalone/po/sc.po1
-rw-r--r--perl-install/standalone/po/sk.po1
-rw-r--r--perl-install/standalone/po/sl.po5
-rw-r--r--perl-install/standalone/po/sq.po1
-rw-r--r--perl-install/standalone/po/sr.po1
-rw-r--r--perl-install/standalone/po/sr@Latn.po1
-rw-r--r--perl-install/standalone/po/sv.po1
-rw-r--r--perl-install/standalone/po/ta.po1
-rw-r--r--perl-install/standalone/po/tg.po5
-rw-r--r--perl-install/standalone/po/th.po1
-rw-r--r--perl-install/standalone/po/tl.po1
-rw-r--r--perl-install/standalone/po/tr.po1
-rw-r--r--perl-install/standalone/po/uk.po12
-rw-r--r--perl-install/standalone/po/uz.po1
-rw-r--r--perl-install/standalone/po/uz@cyrillic.po1
-rw-r--r--perl-install/standalone/po/vi.po5
-rw-r--r--perl-install/standalone/po/wa.po15
-rw-r--r--perl-install/standalone/po/zh_CN.po1
-rw-r--r--perl-install/standalone/po/zh_TW.po1
71 files changed, 121 insertions, 45 deletions
diff --git a/perl-install/standalone/po/af.po b/perl-install/standalone/po/af.po
index a2ffa7214..48ec0215b 100644
--- a/perl-install/standalone/po/af.po
+++ b/perl-install/standalone/po/af.po
@@ -15,6 +15,7 @@ msgstr ""
"PO-Revision-Date: 2005-04-21 17:33+0200\n"
"Last-Translator: Dirk van der Walt <dirkvanderwalt@webmail.co.za>\n"
"Language-Team: Afrikaans\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/am.po b/perl-install/standalone/po/am.po
index 810aadc25..b1b543f54 100644
--- a/perl-install/standalone/po/am.po
+++ b/perl-install/standalone/po/am.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2004-06-01 03:36+0100\n"
"Last-Translator: Alemayehu <alemayehu@gmx.at>\n"
"Language-Team: Amharic <am-translate@geez.org>\n"
+"Language: am\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ar.po b/perl-install/standalone/po/ar.po
index abcbbecd4..06704ff40 100644
--- a/perl-install/standalone/po/ar.po
+++ b/perl-install/standalone/po/ar.po
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2005-03-03 01:06+0300\n"
"Last-Translator: Ossama M. Khayat <okhayat@yahoo.com>\n"
"Language-Team: Arabic <support@arabeyes.org>\n"
+"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/az.po b/perl-install/standalone/po/az.po
index 7fc1f7f86..8f705269e 100644
--- a/perl-install/standalone/po/az.po
+++ b/perl-install/standalone/po/az.po
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2005-03-31 14:21+0200\n"
"Last-Translator: Mətin Əmirov <metin@karegen.com>\n"
"Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n"
+"Language: az\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/be.po b/perl-install/standalone/po/be.po
index d38ac7fc1..05aa26ecd 100644
--- a/perl-install/standalone/po/be.po
+++ b/perl-install/standalone/po/be.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2000-09-24 12:30 +0100\n"
"Last-Translator: Alexander Bokovoy <ab@avilink.net>\n"
"Language-Team: be\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/bg.po b/perl-install/standalone/po/bg.po
index d0fc1836e..ca072e7a7 100644
--- a/perl-install/standalone/po/bg.po
+++ b/perl-install/standalone/po/bg.po
@@ -16,6 +16,7 @@ msgstr ""
"Last-Translator: Kolio Kolev <kolio_kolev@biotronica.net>\n"
"Language-Team: Bulgarian <Mageia User Group - Bulgaria <mandriva-"
"bg@googlegroups.com>>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/bn.po b/perl-install/standalone/po/bn.po
index ea465161b..e27a2ef94 100644
--- a/perl-install/standalone/po/bn.po
+++ b/perl-install/standalone/po/bn.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2005-03-19 23:18+0600\n"
"Last-Translator: Samia <mailsamia2001@yahoo.com>\n"
"Language-Team: Bangla <mdk-translation@bengalinux.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/br.po b/perl-install/standalone/po/br.po
index b3dc8fc47..ee19ef772 100644
--- a/perl-install/standalone/po/br.po
+++ b/perl-install/standalone/po/br.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-10-29 18:17+0100\n"
"Last-Translator: Thierry Vignaud <tvignaud@mandriva.com>\n"
"Language-Team: Brezhoneg <ofisk@wanadoo.fr>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/bs.po b/perl-install/standalone/po/bs.po
index 7a0ea1bae..91ac0def6 100644
--- a/perl-install/standalone/po/bs.po
+++ b/perl-install/standalone/po/bs.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2006-09-09 19:47+0200\n"
"Last-Translator: Vedran Ljubovic <vljubovic@smartnet.ba>\n"
"Language-Team: Bosnian <lokal@linux.org.ba>\n"
+"Language: bs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ca.po b/perl-install/standalone/po/ca.po
index 3a2383228..4d8b918e4 100644
--- a/perl-install/standalone/po/ca.po
+++ b/perl-install/standalone/po/ca.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2005-09-13 23:24+0200\n"
"Last-Translator: Albert Astals Cid <astals11@terra.es>\n"
"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
+"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/cs.po b/perl-install/standalone/po/cs.po
index 31344f374..4374ed8c7 100644
--- a/perl-install/standalone/po/cs.po
+++ b/perl-install/standalone/po/cs.po
@@ -11,11 +11,12 @@ msgstr ""
"PO-Revision-Date: 2010-05-03 22:07+0200\n"
"Last-Translator: Michal Bukovjan <bukm@centrum.cz>\n"
"Language-Team: Czech <kde-i18n-doc@kde.org>\n"
+"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.0\n"
#: display_help:50 display_help:55 drakbug:186 drakperm:136
@@ -3017,8 +3018,8 @@ msgid ""
msgstr ""
"Váš %s nelze nastavit plně automaticky.\n"
"\n"
-"Je zapotřebí ručních zásahů. Upravte prosím soubor s nastavením /etc/sane.d/%"
-"s.conf. "
+"Je zapotřebí ručních zásahů. Upravte prosím soubor s nastavením /etc/sane.d/"
+"%s.conf. "
#: scannerdrake:407 scannerdrake:416
#, c-format
diff --git a/perl-install/standalone/po/cy.po b/perl-install/standalone/po/cy.po
index 6f7dc7831..e38807eaf 100644
--- a/perl-install/standalone/po/cy.po
+++ b/perl-install/standalone/po/cy.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-03-27 15:01-0000\n"
"Last-Translator: Rhoslyn Prys <rprys@yahoo.com>\n"
"Language-Team: Cymraeg\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/da.po b/perl-install/standalone/po/da.po
index 2845a2243..f689e1239 100644
--- a/perl-install/standalone/po/da.po
+++ b/perl-install/standalone/po/da.po
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2010-06-06 00:21+0200\n"
"Last-Translator: Keld Simonsen <keld@keldix.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
+"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/de.po b/perl-install/standalone/po/de.po
index 4856664a6..ba6a5b94f 100644
--- a/perl-install/standalone/po/de.po
+++ b/perl-install/standalone/po/de.po
@@ -24,6 +24,7 @@ msgstr ""
"PO-Revision-Date: 2010-04-27 11:20+0200\n"
"Last-Translator: Oliver Burger <oliver@mandrivauser.de>\n"
"Language-Team: German <cooker-i18n@mandrivalinux.org>\n"
+"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/el.po b/perl-install/standalone/po/el.po
index 2f352e222..6fc096c67 100644
--- a/perl-install/standalone/po/el.po
+++ b/perl-install/standalone/po/el.po
@@ -19,6 +19,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-23 13:17+0200\n"
"Last-Translator: Glentadakis Dimitrios <dglent@gmail.com>\n"
"Language-Team: Greek <translators_team@mandrivalinux.gr>\n"
+"Language: el\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -1365,7 +1366,8 @@ msgstr ""
"\n"
"\n"
"Σημείωση: Αν έχετε κάρτα ήχου ISA PnP, θα πρέπει να εκτελέσετε το πρόγραμμα "
-"alsaconf ή sndconfig. Απλά γράψτε « alsaconf » ή « sndconfig » σε μια κονσόλα."
+"alsaconf ή sndconfig. Απλά γράψτε « alsaconf » ή « sndconfig » σε μια "
+"κονσόλα."
#: drakups:71
#, c-format
@@ -3111,8 +3113,8 @@ msgid ""
"Graphics in the applications menu."
msgstr ""
"Το %s έχει ρυθμιστεί. \n"
-"Μπορείτε τώρα να σαρώσετε έγγραφα με το « XSane » από το Πολυμέσα/Γραφικά στο "
-"μενού εφαρμογών."
+"Μπορείτε τώρα να σαρώσετε έγγραφα με το « XSane » από το Πολυμέσα/Γραφικά "
+"στο μενού εφαρμογών."
#: scannerdrake:446
#, c-format
@@ -3663,10 +3665,11 @@ msgstr "Τοπικές ρυθμίσεις"
#~ "ένα όνομα χρήστη.\n"
#~ "\n"
#~ "\n"
-#~ "Το μενού « <span weight=\"bold\">Επίπεδο Ασφαλείας</span> » επιτρέπει την\n"
+#~ "Το μενού « <span weight=\"bold\">Επίπεδο Ασφαλείας</span> » επιτρέπει "
+#~ "την\n"
#~ "επιλογή ανάμεσα σε έξι επίπεδα ασφαλείας διαμορφωμένα από το msec.\n"
-#~ "Το επίπεδο ασφαλείας κυμαίνεται από « <span weight=\"bold\">Φτωχό</span> » "
-#~ "έως\n"
+#~ "Το επίπεδο ασφαλείας κυμαίνεται από « <span weight=\"bold\">Φτωχό</"
+#~ "span> » έως\n"
#~ "« <span weight=\"bold\">Παρανοϊκό</span> », διαμορφωμένο για\n"
#~ "διακομιστές υψίστης ασφαλείας.\n"
#~ "\n"
diff --git a/perl-install/standalone/po/eo.po b/perl-install/standalone/po/eo.po
index 083140a0c..7dc1f5287 100644
--- a/perl-install/standalone/po/eo.po
+++ b/perl-install/standalone/po/eo.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2003-03-12 18:31-0400\n"
"Last-Translator: Vilhelmo Lutermano <vlutermano@free.fr>\n"
"Language-Team: esperanto <eo@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/es.po b/perl-install/standalone/po/es.po
index 6ec3e6514..7f1535ce1 100644
--- a/perl-install/standalone/po/es.po
+++ b/perl-install/standalone/po/es.po
@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-03 09:45-0300\n"
"Last-Translator: Diego Bello Carreño <dbello@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/et.po b/perl-install/standalone/po/et.po
index 3baa18e6c..008a4c0b4 100644
--- a/perl-install/standalone/po/et.po
+++ b/perl-install/standalone/po/et.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-10 13:17+0200\n"
"Last-Translator: Marek Laane <bald@smail.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
+"Language: et\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/eu.po b/perl-install/standalone/po/eu.po
index f14b4ffde..2adabd335 100644
--- a/perl-install/standalone/po/eu.po
+++ b/perl-install/standalone/po/eu.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-10 23:33+0200\n"
"Last-Translator: Iñigo Salvador Azurmendi <xalba@euskalnet.net>\n"
"Language-Team: Basque <kde-i18n-doc@kde.org>\n"
+"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/fa.po b/perl-install/standalone/po/fa.po
index 373d556c8..dd516f6fd 100644
--- a/perl-install/standalone/po/fa.po
+++ b/perl-install/standalone/po/fa.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2005-02-26 06:31+0100\n"
"Last-Translator: Abbas Izad <abbasizad@hotmail.com>\n"
"Language-Team: Persian\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/fi.po b/perl-install/standalone/po/fi.po
index 497751b02..f472a5a4f 100644
--- a/perl-install/standalone/po/fi.po
+++ b/perl-install/standalone/po/fi.po
@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-02 09:08+0200\n"
"Last-Translator: Jani Välimaa <wally@mandriva.org>\n"
"Language-Team: Finnish <cooker-i18n@mandrivalinux.org>\n"
+"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/fr.po b/perl-install/standalone/po/fr.po
index 908a240cd..92ceb1a67 100644
--- a/perl-install/standalone/po/fr.po
+++ b/perl-install/standalone/po/fr.po
@@ -79,6 +79,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-13 19:34+0100\n"
"Last-Translator: Christophe Berthelé <berthy@mandriva.org>\n"
"Language-Team: French <cooker-i18n@mandrivalinux.org>\n"
+"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -2804,8 +2805,8 @@ msgid ""
"\"%s\" is a local user, but you did not select a local smtp, so you must use "
"a complete email address!"
msgstr ""
-"« %s » est un utilisateur local mais vous n'avez pas spécifié de serveur SMTP "
-"local.\n"
+"« %s » est un utilisateur local mais vous n'avez pas spécifié de serveur "
+"SMTP local.\n"
"Vous devez donc utiliser une adresse de courriel complète !"
#: logdrake:457
@@ -3131,8 +3132,8 @@ msgid ""
"More info in the driver's manual page. Run the command \"man sane-%s\" to "
"read it."
msgstr ""
-"Plus d'infos dans la page de manuel du pilote. Exécutez la commande «man sane-"
-"%s» pour le lire."
+"Plus d'infos dans la page de manuel du pilote. Exécutez la commande «man "
+"sane-%s» pour le lire."
#: scannerdrake:409 scannerdrake:418
#, c-format
@@ -3428,7 +3429,8 @@ msgstr "Détection du matériel en cours"
#: service_harddrake_confirm:7
#, c-format
msgid "Hardware changes in \"%s\" class (%s seconds to answer)"
-msgstr "Modification matériel dans la classe « %s » (%s secondes pour répondre)"
+msgstr ""
+"Modification matériel dans la classe « %s » (%s secondes pour répondre)"
#: service_harddrake_confirm:8
#, c-format
diff --git a/perl-install/standalone/po/fur.po b/perl-install/standalone/po/fur.po
index e47ab605d..e349c41d2 100644
--- a/perl-install/standalone/po/fur.po
+++ b/perl-install/standalone/po/fur.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2004-06-28 17:41+0200\n"
"Last-Translator: Andrea Gracco <graccoandrea@tin.it>\n"
"Language-Team: furlan <gft@freelists.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ga.po b/perl-install/standalone/po/ga.po
index 5e28c1f3b..f1dcac06f 100644
--- a/perl-install/standalone/po/ga.po
+++ b/perl-install/standalone/po/ga.po
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2005-09-12 18:04+0200\n"
"Last-Translator: Alastair McKinstry <mckinstry@computer.org>\n"
"Language-Team: Irish <ga@li.org>\n"
+"Language: ga\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/gl.po b/perl-install/standalone/po/gl.po
index 97087f9df..8e0b7626a 100644
--- a/perl-install/standalone/po/gl.po
+++ b/perl-install/standalone/po/gl.po
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2009-10-05 18:17+0200\n"
"Last-Translator: Alejo Pacín Jul <alejopj@gmail.com>\n"
"Language-Team: Galician <cooker-i18n@mandrivalinux.org>\n"
+"Language: gl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/he.po b/perl-install/standalone/po/he.po
index 834b3e174..d4c4cf447 100644
--- a/perl-install/standalone/po/he.po
+++ b/perl-install/standalone/po/he.po
@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2008-03-24 03:26+0200\n"
"Last-Translator: Dotan Kamber <kamberd@yahoo.com>\n"
"Language-Team: Hebrew\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/hi.po b/perl-install/standalone/po/hi.po
index d7a579bc8..bebea98c7 100644
--- a/perl-install/standalone/po/hi.po
+++ b/perl-install/standalone/po/hi.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2004-04-04 21:54+0530\n"
"Last-Translator: धनञ्जय शर्मा (Dhananjaya Sharma) <dysxhi@yahoo.co.in>\n"
"Language-Team: हिन्दी (Hindi) <dysxhi@yahoo.co.in>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/hr.po b/perl-install/standalone/po/hr.po
index 5e84d2b21..92f23eca1 100644
--- a/perl-install/standalone/po/hr.po
+++ b/perl-install/standalone/po/hr.po
@@ -9,11 +9,12 @@ msgstr ""
"PO-Revision-Date: 2005-01-04 21:25+CET\n"
"Last-Translator: auto\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
+"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;;\n"
"X-Generator: TransDict server\n"
#: display_help:50 display_help:55 drakbug:186 drakperm:136
diff --git a/perl-install/standalone/po/hu.po b/perl-install/standalone/po/hu.po
index 16ec79b33..ea7be25c4 100644
--- a/perl-install/standalone/po/hu.po
+++ b/perl-install/standalone/po/hu.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-11 12:37+0100\n"
"Last-Translator: Gergely Lónyai <aleph@mandriva.org>\n"
"Language-Team: Hungarian <aleph@mandriva.org>\n"
+"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/id.po b/perl-install/standalone/po/id.po
index b66f119c5..e31bd7263 100644
--- a/perl-install/standalone/po/id.po
+++ b/perl-install/standalone/po/id.po
@@ -20,6 +20,7 @@ msgstr ""
"PO-Revision-Date: 2007-10-27 19:35+0700\n"
"Last-Translator: Willy Sudiarto Raharjo <willysr@gmail.com>\n"
"Language-Team: Indonesia <mdk-id@yahoogroups.com>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/is.po b/perl-install/standalone/po/is.po
index f74af58e0..d5826fe07 100644
--- a/perl-install/standalone/po/is.po
+++ b/perl-install/standalone/po/is.po
@@ -15,6 +15,7 @@ msgstr ""
"PO-Revision-Date: 2009-03-27 11:38+0000\n"
"Last-Translator: Pjetur G. Hjaltason <pjetur@pjetur.net>\n"
"Language-Team: Icelandic <kde-isl@molar.is>\n"
+"Language: is\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/it.po b/perl-install/standalone/po/it.po
index 716b08303..2b5a7551a 100644
--- a/perl-install/standalone/po/it.po
+++ b/perl-install/standalone/po/it.po
@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-01 21:43+0200\n"
"Last-Translator: Andrea Celli <andrea.celli@libero.it>\n"
"Language-Team: Italian <timl@frelists.org>\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ja.po b/perl-install/standalone/po/ja.po
index 23855974a..7031a7689 100644
--- a/perl-install/standalone/po/ja.po
+++ b/perl-install/standalone/po/ja.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2009-03-22 19:59+0900\n"
"Last-Translator: Yukiko Bando <ybando@k6.dion.ne.jp>\n"
"Language-Team: Japanese <cooker-i18n@mandrivalinux.org>\n"
+"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ko.po b/perl-install/standalone/po/ko.po
index 437617f86..6f81d7fc6 100644
--- a/perl-install/standalone/po/ko.po
+++ b/perl-install/standalone/po/ko.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2002-09-09 09:08+0900\n"
"Last-Translator: Jaegeum Cze <baedaron@hanafos.com>\n"
"Language-Team: Korean <beadaron@hanafos.com>\n"
+"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ky.po b/perl-install/standalone/po/ky.po
index cd174d22f..8803d20f2 100644
--- a/perl-install/standalone/po/ky.po
+++ b/perl-install/standalone/po/ky.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2005-04-20 20:27+0500\n"
"Last-Translator: Nurlan Borubaev <nurlan@tamga.info>\n"
"Language-Team: Kyrgyz\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/libDrakX-standalone.pot b/perl-install/standalone/po/libDrakX-standalone.pot
index ce8e2af75..5a457073d 100644
--- a/perl-install/standalone/po/libDrakX-standalone.pot
+++ b/perl-install/standalone/po/libDrakX-standalone.pot
@@ -2,7 +2,6 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
-#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
@@ -13,7 +12,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8-bit\n"
-"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+"Content-Type: text/plain; charset=UTF-8\n"
#: display_help:50 display_help:55 drakbug:186 drakperm:136
#, c-format
diff --git a/perl-install/standalone/po/lt.po b/perl-install/standalone/po/lt.po
index 9779f2e37..f9b9c7ad6 100644
--- a/perl-install/standalone/po/lt.po
+++ b/perl-install/standalone/po/lt.po
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2000-12-23 13:50+0200\n"
"Last-Translator: Mykolas Norvai­as <Myka@centras.lt>\n"
"Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
+"Language: lt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ltg.po b/perl-install/standalone/po/ltg.po
index f3a8b5fed..314193a3c 100644
--- a/perl-install/standalone/po/ltg.po
+++ b/perl-install/standalone/po/ltg.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2004-02-24 13:01+0200\n"
"Last-Translator: Māris Laureckis <linux@latgola.lv>\n"
"Language-Team: Latgalian <linux@latgola.lv>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/lv.po b/perl-install/standalone/po/lv.po
index be07de96e..c52613f33 100644
--- a/perl-install/standalone/po/lv.po
+++ b/perl-install/standalone/po/lv.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2002-09-27 17:45+0200\n"
"Last-Translator: Raivo Saars <spaiks@inbox.lv>\n"
"Language-Team: Latvian <ll10nt@listes.murds.lv>\n"
+"Language: lv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/mk.po b/perl-install/standalone/po/mk.po
index ed742d825..f7f28856b 100644
--- a/perl-install/standalone/po/mk.po
+++ b/perl-install/standalone/po/mk.po
@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2004-11-03 18:47+0100\n"
"Last-Translator: Зоран Димовски <decata@mt.net.mk>\n"
"Language-Team: Macedonian <mkde-l10n@lists.sourceforge.net>\n"
+"Language: mk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/mn.po b/perl-install/standalone/po/mn.po
index 2ad17831f..35149fa5c 100644
--- a/perl-install/standalone/po/mn.po
+++ b/perl-install/standalone/po/mn.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2004-01-02 00:35+0100\n"
"Last-Translator: Sanlig Badral <Badral@openmn.org>\n"
"Language-Team: Mongolian <openmn-core@lists.sf.net>\n"
+"Language: mn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ms.po b/perl-install/standalone/po/ms.po
index 247c14115..af6218fc1 100644
--- a/perl-install/standalone/po/ms.po
+++ b/perl-install/standalone/po/ms.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2008-05-04 13:40+0800\n"
"Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>\n"
"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
+"Language: ms\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/mt.po b/perl-install/standalone/po/mt.po
index bf7edc30e..78b1ba3c1 100644
--- a/perl-install/standalone/po/mt.po
+++ b/perl-install/standalone/po/mt.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2004-10-04 18:45+0200\n"
"Last-Translator: Ramon Casha <ramon.casha@linux.org.mt>\n"
"Language-Team: Maltese <mt@li.org>\n"
+"Language: mt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/nb.po b/perl-install/standalone/po/nb.po
index c7ad30dfd..70c6f1818 100644
--- a/perl-install/standalone/po/nb.po
+++ b/perl-install/standalone/po/nb.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-04 00:13+0200\n"
"Last-Translator: Olav Dahlum <odahlum@gmail.com>\n"
"Language-Team: Norwegian Bokmål <cooker-i18n@mandrivalinux.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -2724,8 +2725,8 @@ msgid ""
"The proprietary driver for your graphic card can not be found, the system is "
"now using the free software driver (%s)."
msgstr ""
-"Fant ikke den godseide skjermkortdriveren. Bruker derfor den frie driveren (%"
-"s)."
+"Fant ikke den godseide skjermkortdriveren. Bruker derfor den frie driveren "
+"(%s)."
#: notify-x11-free-driver-switch:21
#, c-format
diff --git a/perl-install/standalone/po/nl.po b/perl-install/standalone/po/nl.po
index 46a53404f..571f2ba64 100644
--- a/perl-install/standalone/po/nl.po
+++ b/perl-install/standalone/po/nl.po
@@ -17,6 +17,7 @@ msgstr ""
"PO-Revision-Date: 2009-04-10 10:33+0200\n"
"Last-Translator: Reinout van Schouwen <reinout@gmail.com>\n"
"Language-Team: Nederlands\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/nn.po b/perl-install/standalone/po/nn.po
index b40d03e60..2d7de0916 100644
--- a/perl-install/standalone/po/nn.po
+++ b/perl-install/standalone/po/nn.po
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-11 17:04+0200\n"
"Last-Translator: Karl Ove Hufthammer <karl@huftis.org>\n"
"Language-Team: Norwegian Nynorsk <i18n-nn@lister.ping.uio.no>\n"
+"Language: nn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -1338,7 +1339,8 @@ msgstr ""
"\n"
"\n"
"Merk: Viss du har eit ISA PnP-basert lydkort, må du bruka «alsaconf»- eller "
-"«sndconfig»-programma. Berre skriv «alsaconf» eller «sndconfig» i ein konsoll."
+"«sndconfig»-programma. Berre skriv «alsaconf» eller «sndconfig» i ein "
+"konsoll."
#: drakups:71
#, c-format
@@ -3009,8 +3011,8 @@ msgid ""
"More info in the driver's manual page. Run the command \"man sane-%s\" to "
"read it."
msgstr ""
-"Du finn meir informasjon i manualsida til drivaren. Køyr kommandoen «man sane-"
-"%s» for å lesa denne."
+"Du finn meir informasjon i manualsida til drivaren. Køyr kommandoen «man "
+"sane-%s» for å lesa denne."
#: scannerdrake:409 scannerdrake:418
#, c-format
diff --git a/perl-install/standalone/po/pa_IN.po b/perl-install/standalone/po/pa_IN.po
index 1804f0e64..848c59918 100644
--- a/perl-install/standalone/po/pa_IN.po
+++ b/perl-install/standalone/po/pa_IN.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2005-03-27 17:55+0530\n"
"Last-Translator: Jaswinder Singh Phulewala <jaswinderphulewala@yahoo.com>\n"
"Language-Team: Punjabi <punlinux-i18n@lists.soruceforge.net>\n"
+"Language: pa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/pl.po b/perl-install/standalone/po/pl.po
index 91ddf3cbf..aad43e70b 100644
--- a/perl-install/standalone/po/pl.po
+++ b/perl-install/standalone/po/pl.po
@@ -20,6 +20,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-05 09:10+0100\n"
"Last-Translator: Marek Walczak <kubdat@poczta.fm>\n"
"Language-Team: <pl@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/pt.po b/perl-install/standalone/po/pt.po
index 2be3138fb..8585ab9c3 100644
--- a/perl-install/standalone/po/pt.po
+++ b/perl-install/standalone/po/pt.po
@@ -20,6 +20,7 @@ msgstr ""
"PO-Revision-Date: 2010-06-24 03:55+0100\n"
"Last-Translator: Zé <ze@mandriva.org>\n"
"Language-Team: Portuguese <>\n"
+"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -302,8 +303,8 @@ msgid_plural ""
msgstr[0] ""
"Será bastante útil anexar ao seu relatório a saída do seguinte comando: %s."
msgstr[1] ""
-"Será bastante útil anexar ao seu relatório a saída dos seguintes comandos: %"
-"s."
+"Será bastante útil anexar ao seu relatório a saída dos seguintes comandos: "
+"%s."
#: drakbug:164
#, c-format
diff --git a/perl-install/standalone/po/pt_BR.po b/perl-install/standalone/po/pt_BR.po
index 53a6349d5..a6ad61157 100644
--- a/perl-install/standalone/po/pt_BR.po
+++ b/perl-install/standalone/po/pt_BR.po
@@ -21,6 +21,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-06 11:01-0300\n"
"Last-Translator: Sergio Rafael Lemke <sergio@mandriva.com.br>\n"
"Language-Team: Brazilian Portuguese <cooker-i18n@mandrivalinux.org>\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ro.po b/perl-install/standalone/po/ro.po
index fa4884999..63eb2b34a 100644
--- a/perl-install/standalone/po/ro.po
+++ b/perl-install/standalone/po/ro.po
@@ -48,6 +48,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-05 15:08+0100\n"
"Last-Translator: Cătălin Florin RUSSEN <cfrussen@yahoo.co.uk>\n"
"Language-Team: Romanian <cooker-i18n@mandrivalinux.org>\n"
+"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -3078,8 +3079,8 @@ msgid ""
msgstr ""
"%s nu poate fi configurat în mod automat.\n"
"\n"
-"Sînt necesare reglaje manuale. Editați fișierul de configurare /etc/sane.d/%"
-"s.conf. "
+"Sînt necesare reglaje manuale. Editați fișierul de configurare /etc/sane.d/"
+"%s.conf. "
#: scannerdrake:407 scannerdrake:416
#, c-format
diff --git a/perl-install/standalone/po/ru.po b/perl-install/standalone/po/ru.po
index f82a1b940..9a2b01e7e 100644
--- a/perl-install/standalone/po/ru.po
+++ b/perl-install/standalone/po/ru.po
@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-03 20:21+0300\n"
"Last-Translator: Alexander Kazancev <kazancas@mandriva.ru>\n"
"Language-Team: Russian <gnu@mx.ru>\n"
+"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/sc.po b/perl-install/standalone/po/sc.po
index 88ab33d05..7ac3adb86 100644
--- a/perl-install/standalone/po/sc.po
+++ b/perl-install/standalone/po/sc.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2005-09-14 11:29+0100\n"
"Last-Translator: Antoni Pistis <antonio.pistis@virgilio.it>\n"
"Language-Team: Sardu\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/sk.po b/perl-install/standalone/po/sk.po
index e1e2cf3cc..83f71eed5 100644
--- a/perl-install/standalone/po/sk.po
+++ b/perl-install/standalone/po/sk.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2005-09-21 14:03+0100\n"
"Last-Translator: Tibor Pittich <Tibor.Pittich@mandriva.org>\n"
"Language-Team: <i18n@mandrake.sk>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/sl.po b/perl-install/standalone/po/sl.po
index 00e011f07..afdaf460f 100644
--- a/perl-install/standalone/po/sl.po
+++ b/perl-install/standalone/po/sl.po
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-25 04:06+0200\n"
"Last-Translator: Jure Repinc <jlp@holodeck1.com>\n"
"Language-Team: Slovenian <lugos-slo@lugos.si>\n"
+"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -2712,8 +2713,8 @@ msgid ""
"\"%s\" is a local user, but you did not select a local smtp, so you must use "
"a complete email address!"
msgstr ""
-"»%s« je krajevni uporabnik, vendar niste izbrali krajevnega SMTP, zato morate "
-"uporabiti celoten e-poštni naslov!"
+"»%s« je krajevni uporabnik, vendar niste izbrali krajevnega SMTP, zato "
+"morate uporabiti celoten e-poštni naslov!"
#: logdrake:457
#, c-format
diff --git a/perl-install/standalone/po/sq.po b/perl-install/standalone/po/sq.po
index 02f15eb0c..d4f104979 100644
--- a/perl-install/standalone/po/sq.po
+++ b/perl-install/standalone/po/sq.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-15 13:33+0200\n"
"Last-Translator: Naim Daka <naim70@freesurf.ch>\n"
"Language-Team: Albanian <LL@li.org>\n"
+"Language: sq\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
diff --git a/perl-install/standalone/po/sr.po b/perl-install/standalone/po/sr.po
index ea75e6087..420a39ecf 100644
--- a/perl-install/standalone/po/sr.po
+++ b/perl-install/standalone/po/sr.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-15 13:33+0200\n"
"Last-Translator: Toma Jankovic <tomaja@net.yu>\n"
"Language-Team: Serbian <i18n@mandrake.co.yu>\n"
+"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/sr@Latn.po b/perl-install/standalone/po/sr@Latn.po
index 9fb596e2b..a9227b813 100644
--- a/perl-install/standalone/po/sr@Latn.po
+++ b/perl-install/standalone/po/sr@Latn.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-15 13:34+0200\n"
"Last-Translator: Toma Jankovic_<tomaja@net.yu>\n"
"Language-Team: Serbian <i18n@mandrake.co.yu>\n"
+"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/sv.po b/perl-install/standalone/po/sv.po
index f0cf49b7b..a88464062 100644
--- a/perl-install/standalone/po/sv.po
+++ b/perl-install/standalone/po/sv.po
@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-30 16:23+0300\n"
"Last-Translator: Thomas Backlund <tmb@mandriva.org>\n"
"Language-Team: Swedish <cooker-i18n@mandrivalinux.org>\n"
+"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/ta.po b/perl-install/standalone/po/ta.po
index 48cc8a63d..0ce39aab0 100644
--- a/perl-install/standalone/po/ta.po
+++ b/perl-install/standalone/po/ta.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2002-09-06 00:35+0800\n"
"Last-Translator: prabu anand <prabu_anand2000@yahoo.com>\n"
"Language-Team: Tamil <tamilinix@yahoogroups.com>\n"
+"Language: ta\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/tg.po b/perl-install/standalone/po/tg.po
index 0af828898..66d2edf38 100644
--- a/perl-install/standalone/po/tg.po
+++ b/perl-install/standalone/po/tg.po
@@ -20,6 +20,7 @@ msgstr ""
"PO-Revision-Date: 2005-09-17 16:03+0500\n"
"Last-Translator: Victor Ibragimov <youth_opportunities@tajikngo.org>\n"
"Language-Team: Tajik\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -3498,8 +3499,8 @@ msgstr "Танзимдарориҳо"
#~ "Some of the early i486DX-100 chips cannot reliably return to operating "
#~ "mode after the \"halt\" instruction is used"
#~ msgstr ""
-#~ "Баъд аз истифодаи дастурамали \"halt\" якчанд аз чипҳои пештараи i486DX-"
-#~ "100-ро боэътимод ба усули корӣ баргардонида намешавад"
+#~ "Баъд аз истифодаи дастурамали \"halt\" якчанд аз чипҳои пештараи "
+#~ "i486DX-100-ро боэътимод ба усули корӣ баргардонида намешавад"
#~ msgid "Bugs"
#~ msgstr "Хатогиҳо"
diff --git a/perl-install/standalone/po/th.po b/perl-install/standalone/po/th.po
index 4833f4653..713e2b25d 100644
--- a/perl-install/standalone/po/th.po
+++ b/perl-install/standalone/po/th.po
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2001-09-10 14:24GMT+7\n"
"Last-Translator: Wachara Chinsettawong <wachara@yahoo.com>\n"
"Language-Team: Thai <th@li.org>\n"
+"Language: th\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/tl.po b/perl-install/standalone/po/tl.po
index 57cecc770..754b39705 100644
--- a/perl-install/standalone/po/tl.po
+++ b/perl-install/standalone/po/tl.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-15 13:35+0200\n"
"Last-Translator: Arys P. Deloso <arys@deloso.org>\n"
"Language-Team: Filipino <salinpinoy@comitus.net>\n"
+"Language: fil\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/tr.po b/perl-install/standalone/po/tr.po
index 3efbc6c4d..19382555c 100644
--- a/perl-install/standalone/po/tr.po
+++ b/perl-install/standalone/po/tr.po
@@ -20,6 +20,7 @@ msgstr ""
"PO-Revision-Date: 2010-05-07 23:27+0200\n"
"Last-Translator: Atilla ÖNTAŞ <atilla_ontas@mandriva.org>\n"
"Language-Team: Turkish <cooker-i18n@mandrivalinux.org>\n"
+"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/uk.po b/perl-install/standalone/po/uk.po
index e5543b1e4..1fcd5c371 100644
--- a/perl-install/standalone/po/uk.po
+++ b/perl-install/standalone/po/uk.po
@@ -16,12 +16,13 @@ msgstr ""
"PO-Revision-Date: 2010-05-13 23:27-0400\n"
"Last-Translator: Taras Boychuk <btr0001@ukr.net>\n"
"Language-Team: Ukrainian <translation@linux.org.ua>\n"
+"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.0\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: display_help:50 display_help:55 drakbug:186 drakperm:136
#, c-format
@@ -3033,8 +3034,8 @@ msgid ""
"More info in the driver's manual page. Run the command \"man sane-%s\" to "
"read it."
msgstr ""
-"Детальніше читайте в документації до драйвера. Виконайте команду \"man sane-%"
-"s\", щоб прочитати її."
+"Детальніше читайте в документації до драйвера. Виконайте команду \"man sane-"
+"%s\", щоб прочитати її."
#: scannerdrake:409 scannerdrake:418
#, c-format
@@ -3295,7 +3296,8 @@ msgstr "Графічна картка «%s» вже не підтримуєть
#, c-format
msgid "The proprietary kernel driver was not found for '%s' X.org driver"
msgstr ""
-"Для драйвера X.org «%s» не знайдено відповідного пропрієтарного драйвера ядра."
+"Для драйвера X.org «%s» не знайдено відповідного пропрієтарного драйвера "
+"ядра."
#: service_harddrake:220
#, c-format
diff --git a/perl-install/standalone/po/uz.po b/perl-install/standalone/po/uz.po
index b0689b4c5..40761eed1 100644
--- a/perl-install/standalone/po/uz.po
+++ b/perl-install/standalone/po/uz.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2007-09-26 23:16+0200\n"
"Last-Translator: Mashrab Kuvatov <kmashrab@uni-bremen.de>\n"
"Language-Team: Uzbek <floss-uz-l10n@googlegroups.com>\n"
+"Language: uz\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/uz@cyrillic.po b/perl-install/standalone/po/uz@cyrillic.po
index e419f11c4..d4eb7b721 100644
--- a/perl-install/standalone/po/uz@cyrillic.po
+++ b/perl-install/standalone/po/uz@cyrillic.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2007-09-26 23:16+0200\n"
"Last-Translator: Mashrab Kuvatov <kmashrab@uni-bremen.de>\n"
"Language-Team: Uzbek <floss-uz-l10n@googlegroups.com>\n"
+"Language: uz\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/vi.po b/perl-install/standalone/po/vi.po
index 877432b0d..b0303691b 100644
--- a/perl-install/standalone/po/vi.po
+++ b/perl-install/standalone/po/vi.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2005-06-02 21:17+0700\n"
"Last-Translator: Larry Nguyen <larry@vnlinux.org>\n"
"Language-Team: <gnomevi-list@lists.sourceforge.net>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -3008,8 +3009,8 @@ msgid ""
"More info in the driver's manual page. Run the command \"man sane-%s\" to "
"read it."
msgstr ""
-"Thông tin chi tiết nằm trong driver's manual page. Hãy chạy lệnh \"man sane-%"
-"s\" để đọc."
+"Thông tin chi tiết nằm trong driver's manual page. Hãy chạy lệnh \"man sane-"
+"%s\" để đọc."
#: scannerdrake:409 scannerdrake:418
#, c-format
diff --git a/perl-install/standalone/po/wa.po b/perl-install/standalone/po/wa.po
index a92299395..e483b1941 100644
--- a/perl-install/standalone/po/wa.po
+++ b/perl-install/standalone/po/wa.po
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2006-09-05 19:54+0200\n"
"Last-Translator: Pablo Saratxaga <pablo@walon.org>\n"
"Language-Team: Walloon <linux-wa@walon.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -1905,7 +1906,8 @@ msgid ""
msgstr ""
"Li nawea Linux a mezåjhe di fé ene blouke di carculaedje å moumint di "
"l' enondaedje po poleur defini li conteu do «timer». Li rzultat est metou "
-"come «bogomips», c' est ene manire d' aveur ene idêye del roedeu do processeu."
+"come «bogomips», c' est ene manire d' aveur ene idêye del roedeu do "
+"processeu."
#: harddrake2:73
#, c-format
@@ -2906,7 +2908,8 @@ msgstr "Tchoezi l' fitchî di firmware"
#: scannerdrake:201 scannerdrake:260
#, c-format
msgid "The firmware file %s does not exist or is unreadable!"
-msgstr "Li fitchî d' firmware «%s» n' egzistêye nén ou n' pout nén esse léjhou!"
+msgstr ""
+"Li fitchî d' firmware «%s» n' egzistêye nén ou n' pout nén esse léjhou!"
#: scannerdrake:224
#, c-format
@@ -3039,8 +3042,8 @@ msgid ""
"After that you may scan documents using \"XSane\" or \"Kooka\" from "
"Multimedia/Graphics in the applications menu."
msgstr ""
-"Après çoula vos pôroz scaner des documints avou «XSane» ou «Kooka» a pårti di "
-"l' intrêye «Multimedia/Grafikes» do menu des programes."
+"Après çoula vos pôroz scaner des documints avou «XSane» ou «Kooka» a pårti "
+"di l' intrêye «Multimedia/Grafikes» do menu des programes."
#: scannerdrake:413
#, c-format
@@ -3626,8 +3629,8 @@ msgstr "Apontiaedjes"
#~ "\n"
#~ "Li <span weight=\"bold\">manaedjeu pol såvrité</span> est l' ci ki rçurè "
#~ "les abranles di såvrité, si\n"
-#~ "l' tchuze «<span weight=\"bold\">abranles di såvrité</span>» a stî metowe; "
-#~ "ça pout esse on no d' uzeu\n"
+#~ "l' tchuze «<span weight=\"bold\">abranles di såvrité</span>» a stî "
+#~ "metowe; ça pout esse on no d' uzeu\n"
#~ "oudonbén ene adresse emile.\n"
#~ "\n"
#~ "\n"
diff --git a/perl-install/standalone/po/zh_CN.po b/perl-install/standalone/po/zh_CN.po
index 50e048493..f3bad60e6 100644
--- a/perl-install/standalone/po/zh_CN.po
+++ b/perl-install/standalone/po/zh_CN.po
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2009-04-09 11:56+0800\n"
"Last-Translator: Funda Wang <fundawang@linux.net.cn>\n"
"Language-Team: Mageia Linux i18n Team <cooker-i18n@mandrivalinux.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/perl-install/standalone/po/zh_TW.po b/perl-install/standalone/po/zh_TW.po
index e6fcfae17..5c6a43ae0 100644
--- a/perl-install/standalone/po/zh_TW.po
+++ b/perl-install/standalone/po/zh_TW.po
@@ -23,6 +23,7 @@ msgstr ""
"PO-Revision-Date: 2008-09-28 12:21+0800\n"
"Last-Translator: Shiva Huang <shivahuang@gmail.com>\n"
"Language-Team: Traditional Chinese <zh@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
class="hl kwb">$keyword} = $v; } else { if ($keyword eq 'kernel') { $e->{type} = 'image'; $e->{kernel} = $v; } elsif ($keyword eq 'chainloader') { $e->{type} = 'other'; $e->{append} = ""; } elsif ($keyword eq 'configfile') { $e->{type} = 'grub_configfile'; $e->{configfile} = $v; } elsif ($keyword eq 'map') { $e->{mapdrive}{$2} = $1 if $v =~ m/\((.*)\) \((.*)\)/; } elsif ($keyword eq 'module') { push @{$e->{modules}}, $v; } else { $e->{$keyword} = $v eq '' ? 1 : $v; } } $e and $e->{verbatim} .= $verbatim; } %b; } sub is_already_crypted { my ($password) = @_; $password =~ /^--md5 (.*)/; } sub read_grub_menu_lst { my ($fstab, $grub2dev) = @_; my %b = _parse_grub_menu_lst(); foreach my $keyword (grep { $_ ne 'entries' } keys %b) { $b{$keyword} = $b{$keyword} eq '' ? 1 : grub2file($b{$keyword}, $grub2dev, $fstab, \%b); } #- sanitize foreach my $e (@{$b{entries}}) { if (member($e->{type}, 'other', 'grub_configfile')) { eval { $e->{kernel_or_dev} = grub2dev($e->{rootnoverify} || $e->{grub_root}, $grub2dev) }; $e->{keep_verbatim} = 1 unless $e->{kernel_or_dev}; } elsif ($e->{initrd}) { my $initrd; eval { $initrd = grub2file($e->{initrd}, $grub2dev, $fstab, $e) }; if ($initrd) { $e->{initrd} = $initrd; } else { $e->{keep_verbatim} = 1; } } if ($e->{kernel} =~ /xen/ && @{$e->{modules} || []} == 2 && $e->{modules}[1] =~ /initrd/) { (my $xen, $e->{xen_append}) = split(' ', $e->{kernel}, 2); ($e->{kernel}, my $initrd) = @{delete $e->{modules}}; $e->{xen} = grub2file($xen, $grub2dev, $fstab, $e); $e->{initrd} = grub2file($initrd, $grub2dev, $fstab, $e); } if (my $v = delete $e->{kernel}) { (my $kernel, $e->{append}) = split(' ', $v, 2); $e->{append} = join(' ', grep { !/^BOOT_IMAGE=/ } split(' ', $e->{append})); $e->{root} = $1 if $e->{append} =~ s/root=(\S*)\s*//; eval { $e->{kernel_or_dev} = grub2file($kernel, $grub2dev, $fstab, $e) }; $e->{keep_verbatim} = 1 unless $e->{kernel_or_dev} && dirname($e->{kernel_or_dev}) eq '/boot'; } my ($vga, $other) = partition { /^vga=/ } split(' ', $e->{append}); if (@$vga) { $e->{vga} = $vga->[0] =~ /vga=(.*)/ && $1; $e->{append} = join(' ', @$other); } } $b{nowarn} = 1; # handle broken installkernel -r: if (@{$b{entries}}) { $b{default} = min($b{default}, scalar(@{$b{entries}}) - 1); $b{default} = $b{entries}[$b{default}]{label}; } $b{method} = $b{gfxmenu} ? 'grub-graphic' : 'grub-menu'; \%b; } sub yaboot2dev { my ($of_path) = @_; find { dev2yaboot($_) eq $of_path } map { "/dev/$_->{dev}" } fs::proc_partitions::read_raw(); } # assumes file is in /boot # to do: use yaboot2dev for files as well #- example of of_path: /pci@f4000000/ata-6@d/disk@0:3,/initrd-2.6.8.1-8mdk.img sub yaboot2file { my ($of_path) = @_; if ($of_path =~ /,/) { "$::prefix/boot/" . basename($of_path); } else { yaboot2dev($of_path); } } sub read_silo() { my $bootloader = read_lilo_like("/boot/silo.conf", sub { my ($f) = @_; "/boot$f"; }); $bootloader->{method} = 'silo'; $bootloader; } sub read_pmon2000() { my %b; $b{method} = 'pmon2000'; \%b; } sub read_uboot() { my %b; $b{method} = 'uboot'; \%b; } sub read_cromwell() { my %b; $b{method} = 'cromwell'; \%b; } sub read_yaboot() { my $bootloader = read_lilo_like("/etc/yaboot.conf", \&yaboot2file); $bootloader->{method} = 'yaboot'; $bootloader; } sub read_lilo() { my $bootloader = read_lilo_like("/etc/lilo.conf", sub { $_[0] }); delete $bootloader->{timeout} unless $bootloader->{prompt}; $bootloader->{timeout} = $bootloader->{timeout} / 10 if $bootloader->{timeout}; my $submethod = member($bootloader->{install}, 'text', 'menu') ? $bootloader->{install} : 'menu'; $bootloader->{method} = "lilo-$submethod"; $bootloader; } sub read_lilo_like { my ($file, $filter_file) = @_; my $global = 1; my ($e); my %b; -e "$::prefix$file" or return; foreach my $line (cat_("$::prefix$file")) { next if $line =~ /^\s*#/ || $line =~ /^\s*$/; my ($cmd, $v) = $line =~ /^\s*([^=\s]+)\s*(?:=\s*(.*?))?\s*$/ or log::l("unknown line in $file: $line"), next; if ($cmd =~ /^(?:image|other|macos|macosx|bsd|darwin)$/) { $v = $filter_file->($v); push @{$b{entries}}, $e = { type => $cmd, kernel_or_dev => $v }; $global = 0; } elsif ($global) { if ($cmd eq 'disk' && $v =~ /(\S+)\s+bios\s*=\s*(\S+)/) { $b{bios}{$1} = $2; } elsif ($cmd eq 'bios') { $b{bios}{$b{disk}} = $v; } elsif ($cmd eq 'init-message') { $v =~ s/\\n//g; $v =~ s/"//g; $b{'init-message'} = $v; } else { $b{$cmd} = $v eq '' ? 1 : $v; } } else { if (($cmd eq 'map-drive' .. $cmd eq 'to') && $cmd eq 'to') { $e->{mapdrive}{$e->{'map-drive'}} = $v; } else { if ($cmd eq 'initrd') { $v = $filter_file->($v); } $e->{$cmd} = $v || 1; } } } sub remove_quotes_and_spaces { local ($_) = @_; s/^\s*//; s/\s*$//; s/^"(.*?)"$/$1/; s/\\"/"/g; s/^\s*//; s/\s*$//; #- do it again for append=" foo" $_; } foreach ('append', 'root', 'default', 'raid-extra-boot') { $b{$_} = remove_quotes_and_spaces($b{$_}) if $b{$_}; } foreach my $entry (@{$b{entries}}) { foreach ('append', 'root', 'label') { $entry->{$_} = remove_quotes_and_spaces($entry->{$_}) if $entry->{$_}; } if ($entry->{kernel_or_dev} =~ /\bmbootpack\b/) { $entry->{initrd} = $entry->{kernel_or_dev}; $entry->{initrd} =~ s/\bmbootpack/initrd/; $entry->{kernel_or_dev} =~ s/\bmbootpack/vmlinuz/; $entry->{kernel_or_dev} =~ s/.img$//; #- assume only xen is configured with mbootpack $entry->{xen} = '/boot/xen.gz'; $entry->{root} = $1 if $entry->{append} =~ s/root=(\S*)\s*//; ($entry->{xen_append}, $entry->{append}) = split '\s*--\s*', $entry->{append}, 2; } } # cleanup duplicate labels (in case file is corrupted) @{$b{entries}} = uniq_ { $_->{label} } @{$b{entries}}; \%b; } sub cleanup_entries { my ($bootloader) = @_; #- cleanup bad entries (in case file is corrupted) @{$bootloader->{entries}} = grep { my $pb = $_->{type} eq 'image' && !$_->{keep_verbatim} && ! -e "$::prefix$_->{kernel_or_dev}"; log::l("dropping bootloader entry $_->{label} since $_->{kernel_or_dev} doesn't exist") if $pb; !$pb; } @{$bootloader->{entries}}; } 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); } # list of places where we can install the bootloader sub allowed_boot_parts { my ($bootloader, $all_hds) = @_; ( @{$all_hds->{hds}}, # MBR if_($bootloader->{method} =~ /lilo/, grep { $_->{level} eq '1' } @{$all_hds->{raids}} ), (grep { !isFat_or_NTFS($_) } fs::get::fstab($all_hds)), # filesystems except those who do not leave space for our bootloaders detect_devices::floppies(), ); } sub same_entries { my ($a, $b) = @_; foreach (uniq(keys %$a, keys %$b)) { if (member($_, 'label', 'append', 'mapdrive', 'readonly', 'makeactive', 'verbatim')) { next; } elsif ($_ eq 'grub_root' && (!$a->{$_} || !$b->{$_})) { #- grub_root is mostly internal stuff. if it misses, it's ok next; } 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} do not 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}}; #- we will keep $conflicting, but not with same symlinks if used by the entry to add expand_entry_symlinks($bootloader, $conflicting); } 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; if ($to_add->{label} eq 'linux') { $label = kernel_str2label(vmlinuz2kernel_str($to_add->{kernel_or_dev}), 'use_long_name'); } else { $label =~ s/^alt\d*_//; $label = 'alt' . ($i++ ? $i : '') . "_$label"; } } die 'add_entry'; } sub expand_entry_symlinks { my ($bootloader, $entry) = @_; foreach my $kind ('kernel_or_dev', 'initrd') { my $old_long_name = $bootloader->{old_long_names} && $bootloader->{old_long_names}{$entry->{$kind}} or next; #- replace all the {$kind} using this symlink to the real file log::l("replacing $entry->{$kind} with $old_long_name for bootloader label $entry->{label}"); $entry->{$kind} = $old_long_name; } } sub _do_the_symlink { my ($bootloader, $link, $long_name) = @_; my $existing_link = readlink("$::prefix$link"); if ($existing_link && $existing_link eq $long_name) { #- nothing to do :) return; } if ($existing_link) { #- 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") { $bootloader->{old_long_names}{$link} = $old_long_name; } else { log::l("ERROR: $link points to $old_long_name which does not exist"); } } elsif (-e "$::prefix$link") { log::l("ERROR: $link is not a symbolic link"); } #- changing the symlink symlinkf($long_name, "$::prefix$link") or cp_af("$::prefix/boot/$long_name", "$::prefix$link"); } # for lilo & xen sub get_mbootpack_filename { my ($entry) = @_; my $mbootpack_file = $entry->{initrd}; $mbootpack_file =~ s/\binitrd/mbootpack/; $entry->{xen} && $mbootpack_file; } # for lilo & xen sub build_mbootpack { my ($entry) = @_; my $mbootpack = '/usr/bin/mbootpack'; -f $::prefix . $entry->{kernel_or_dev} && -f $::prefix . $entry->{initrd} or return; my $mbootpack_file = get_mbootpack_filename($entry); -f ($::prefix . $mbootpack_file) and return 1; my $error; my $xen_kernel = '/tmp/xen_kernel'; my $xen_vmlinux = '/tmp/xen_vmlinux'; my $_b = before_leaving { unlink $::prefix . $_ foreach $xen_kernel, $xen_vmlinux }; run_program::rooted($::prefix, '/bin/gzip', '>', $xen_kernel, '2>', \$error, '-dc', $entry->{xen}) or die "unable to uncompress xen kernel"; run_program::rooted($::prefix, '/bin/gzip', '>', $xen_vmlinux, '2>', \$error, '-dc', $entry->{kernel_or_dev}) or die "unable to uncompress xen vmlinuz"; run_program::rooted($::prefix, $mbootpack, "2>", \$error, '-o', $mbootpack_file, '-m', $xen_vmlinux, '-m', $entry->{initrd}, $xen_kernel) or die "mbootpack failed: $error"; 1; } sub add_kernel { my ($bootloader, $kernel_str, $v, $b_nolink, $b_no_initrd) = @_; #- eg: for /boot/vmlinuz-2.6.17-13mdvxen0 (pkg kernel-xen0-xxx) #- or /boot/vmlinuz-2.6.18-xen (pkg kernel-xen-uptodate) if ($kernel_str->{version} =~ /xen/ && -f '/boot/xen.gz') { $v->{xen} = '/boot/xen.gz'; } add2hash($v, { type => 'image', label => kernel_str2label($kernel_str), }); #- normalize append and handle special options { my ($simple, $dict) = unpack_append("$bootloader->{perImageAppend} $v->{append}"); if ($v->{label} eq 'failsafe') { #- perImageAppend contains resume=/dev/xxx which we don't want @$dict = grep { $_->[0] ne 'resume' } @$dict; } if (-e "$::prefix/sbin/udev" && any::cmp_kernel_versions($kernel_str->{version_no_ext}, '2.6.8') >= 0) { log::l("it is a recent kernel, so we remove any existing devfs= kernel option to enable udev"); @$dict = grep { $_->[0] ne 'devfs' } @$dict; } $v->{append} = pack_append($simple, $dict); } if (-e "$::prefix/bin/systemd") { log::l("defaulting to systemd"); #@$dict = grep { $_->[0] ne 'devfs' } @$dict; $v->{append} .= " init=/bin/systemd"; } #- new versions of yaboot do not handle symlinks $b_nolink ||= arch() =~ /ppc/; $b_no_initrd //= (arch() =~ /mips|arm/) && !detect_devices::is_mips_gdium(); $b_nolink ||= $kernel_str->{use_long_name}; #- do not link /boot/vmlinuz to xen $b_nolink ||= $v->{xen}; my $vmlinuz_long = kernel_str2vmlinuz_long($kernel_str); my $initrd_long = kernel_str2initrd_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; log::l("adding $v->{kernel_or_dev}"); if (!$b_no_initrd) { $v->{initrd} = mkinitrd($kernel_str->{version}, $bootloader, $v, "/boot/$initrd_long"); } if (!$b_nolink) { $v->{kernel_or_dev} = '/boot/' . kernel_str2vmlinuz_short($kernel_str); if (arch() =~ /mips/) { log::l("link $::prefix/boot/$vmlinuz_long -> $::prefix$v->{kernel_or_dev}"); linkf("$::prefix/boot/$vmlinuz_long", $::prefix . $v->{kernel_or_dev}); linkf("$::prefix/boot/$vmlinuz_long", $::prefix . $v->{kernel_or_dev} . ".32"); } else { _do_the_symlink($bootloader, $v->{kernel_or_dev}, $vmlinuz_long); } if ($v->{initrd}) { $v->{initrd} = '/boot/' . kernel_str2initrd_short($kernel_str); if (arch() =~ /mips/) { log::l("link $::prefix/boot/$initrd_long -> $::prefix$v->{initrd}"); linkf("$::prefix/boot/$initrd_long", $::prefix . $v->{initrd}); if ($v->{initrd} =~ s/.img$/.gz/) { linkf("$::prefix/boot/$initrd_long", $::prefix . $v->{initrd}); } } else { _do_the_symlink($bootloader, $v->{initrd}, $initrd_long); } } } add_entry($bootloader, $v); } sub rebuild_initrds { my ($bootloader) = @_; my %done; foreach my $v (grep { $_->{initrd} } @{$bootloader->{entries}}) { my $kernel_str = vmlinuz2kernel_str($v->{kernel_or_dev}) or next; my $initrd_long = '/boot/' . kernel_str2initrd_long($kernel_str); next if $done{$initrd_long}++; rebuild_initrd($kernel_str->{version}, $bootloader, $v, $initrd_long); } } # unused (?) 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); } my $uniq_dict_appends = join('|', qw(acpi pci resume PROFILE XFree)); sub unpack_append { my ($s) = @_; my @l = "$s " =~ /((?:[^"\s]+|".*?")*)\s+/g; [ 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 =~ /^($uniq_dict_appends)$/ ? $k : "$k=$v"; } reverse @$dict) ]; join(' ', @$simple, map { "$_->[0]=$_->[1]" } @$dict); } sub modify_append { my ($b, $f) = @_; my @l = grep { $_->{type} eq 'image' && !$_->{keep_verbatim} && !($::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 get_append_simple { my ($b, $key) = @_; my ($simple, $_dict) = unpack_append($b->{perImageAppend}); member($key, @$simple); } sub get_append_with_key { my ($b, $key) = @_; my ($_simple, $dict) = unpack_append($b->{perImageAppend}); my @l = map { $_->[1] } grep { $_->[0] eq $key } @$dict; log::l("more than one $key in $b->{perImageAppend}") if @l > 1; $l[0]; } sub remove_append_simple { my ($b, $key) = @_; modify_append($b, sub { my ($simple, $_dict) = @_; @$simple = grep { $_ ne $key } @$simple; }); } sub set_append_with_key { my ($b, $key, $val) = @_; modify_append($b, sub { my ($_simple, $dict) = @_; if ($val eq '') { @$dict = grep { $_->[0] ne $key } @$dict; } else { push @$dict, [ $key, $val ]; } }); } sub set_append_simple { my ($b, $key) = @_; modify_append($b, sub { my ($simple, $_dict) = @_; @$simple = uniq(@$simple, $key); }); } sub may_append_with_key { my ($b, $key, $val) = @_; set_append_with_key($b, $key, $val) if !get_append_with_key($b, $key); } sub get_append_netprofile { my ($e) = @_; my ($simple, $dict) = unpack_append($e->{append}); my ($p, $dict_) = partition { $_->[0] eq 'PROFILE' } @$dict; pack_append($simple, $dict_), $p->[0][1]; } sub set_append_netprofile { my ($e, $append, $profile) = @_; my ($simple, $dict) = unpack_append($append); push @$dict, [ 'PROFILE', $profile ] if $profile; $e->{append} = pack_append($simple, $dict); } # used when a bootloader $entry has been modified (eg: $entry->{vga}) sub configure_entry { my ($bootloader, $entry) = @_; $entry->{type} eq 'image' or return; if (my $kernel_str = vmlinuz2kernel_str($entry->{kernel_or_dev})) { $entry->{initrd} = mkinitrd($kernel_str->{version}, $bootloader, $entry, $entry->{initrd} || '/boot/' . kernel_str2initrd_short($kernel_str)); } } sub get_kernels_and_labels_before_kernel_remove { my ($to_remove_kernel) = @_; my @kernels = grep { $_ ne $to_remove_kernel } installed_vmlinuz(); map { kernel_str2label($_) => $_ } get_kernel_labels(\@kernels); } sub get_kernels_and_labels { my ($b_prefer_24) = @_; get_kernel_labels([ installed_vmlinuz() ], $b_prefer_24); } sub get_kernel_labels { my ($kernels, $b_prefer_24) = @_; my @kernels_str = sort { any::cmp_kernel_versions($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); } my %labels; foreach (@kernels_str) { if ($labels{$_->{ext}}) { $_->{use_long_name} = 1; } else { $labels{$_->{ext}} = 1; } } $kernels_str[0]{ext} = ''; @kernels_str; } sub short_ext { my ($kernel_str) = @_; my $short_ext = { 'i586-up-1GB' => 'i586', 'i686-up-4GB' => '4GB', 'xen0' => 'xen', }->{$kernel_str->{ext}}; $short_ext || $kernel_str->{ext}; } # deprecated, only for compatibility (nov 2007) sub sanitize_ver { my ($_name, $kernel_str) = @_; _sanitize_ver($kernel_str); } sub _sanitize_ver { my ($kernel_str) = @_; my $name = $kernel_str->{basename}; $name = '' if $name eq 'vmlinuz'; my $v = $kernel_str->{version_no_ext}; if ($v =~ s/-\d+\.mm\././) { $name = join(' ', grep { $_ } $name, 'multimedia'); } $v =~ s!(md[kv]|mnb)$!!; $v =~ s!-0\.(pre|rc)(\d+)\.!$1$2-!; my $return = join(' ', grep { $_ } $name, short_ext($kernel_str), $v); length($return) < 30 or $return =~ s!secure!sec!; length($return) < 30 or $return =~ s!enterprise!ent!; length($return) < 30 or $return =~ s!multimedia!mm!; $return; } # for lilo sub suggest_message_text { my ($bootloader) = @_; if (!$bootloader->{message} && !$bootloader->{message_text} && arch() !~ /ia64/) { 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 40% of 8bits chars #- else, use the translation but force a conversion to ascii #- to be sure there won't be undisplayable characters if (int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) > 0.4) { $msg = $msg_en; } else { $msg = Locale::gettext::iconv($msg, "utf-8", "ascii//TRANSLIT"); } $bootloader->{message_text} = $msg; } } sub suggest { my ($bootloader, $all_hds, %options) = @_; my $fstab = [ fs::get::fstab($all_hds) ]; my $root_part = fs::get::root($fstab); my $root = isLoopback($root_part) ? '/dev/loop7' : fs::wild_device::from_part('', $root_part); my $boot = fs::get::root($fstab, 'boot')->{device}; #- PPC xfs module requires enlarged initrd my $xfsroot = $root_part->{fs_type} eq 'xfs'; my $mbr; # If installing onto an USB drive, put the mbr there, else on the first non removable drive if ($root_part->{is_removable}) { $mbr = fs::get::part2hd($root_part, $all_hds); } else { $mbr = find { !$_->{is_removable} } @{$all_hds->{hds}}; } my ($onmbr, $unsafe) = $bootloader->{crushMbr} ? (1, 0) : suggest_onmbr($mbr); add2hash_($bootloader, arch() =~ /ppc/ ? { defaultos => "linux", entries => [], 'init-message' => "Welcome to %s!", delay => 30, #- OpenFirmware delay timeout => 50, enableofboot => 1, enablecdboot => 1, if_(detect_devices::get_mac_model() =~ /IBM/, boot => "/dev/sda1", ), xfsroot => $xfsroot, } : { bootUnsafe => $unsafe, entries => [], timeout => $onmbr && 10, nowarn => 1, if_(arch() !~ /ia64/, boot => "/dev/" . ($onmbr ? $mbr->{device} : $boot), map => "/boot/map", compact => 1, 'large-memory' => 1, color => 'black/cyan yellow/cyan', 'menu-scheme' => 'wb:bw:wb:bw' ), }); suggest_message_text($bootloader); 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_with_key($bootloader, console => $s); any::set_login_serial_console($port, $speed); } my @kernels = get_kernels_and_labels() or die "no kernel installed"; my %old_kernels = map { vmlinuz2version($_->{kernel_or_dev}) => 1 } @{$bootloader->{entries}}; @kernels = grep { !$old_kernels{$_->{version}} } @kernels; #- remove existing failsafe and linux-nonfb, do not care if the previous one was modified by the user? @{$bootloader->{entries}} = grep { !member($_->{label}, qw(failsafe linux-nonfb)) } @{$bootloader->{entries}}; foreach my $kernel (@kernels) { my $e = add_kernel($bootloader, $kernel, { root => $root, if_($options{vga_fb}, vga => $options{vga_fb}), #- using framebuffer if_($options{vga_fb} && $options{quiet}, append => "splash=silent"), }); if ($options{vga_fb} && $e->{label} eq 'linux') { add_kernel($bootloader, $kernel, { root => $root, label => 'linux-nonfb' }); } } add_kernel($bootloader, $kernels[0], { root => $root, label => 'failsafe', append => 'failsafe' }) if @kernels; if (arch() =~ /ppc/) { #- if we identified a MacOS partition earlier - add it if (defined $partition_table::mac::macos_part) { add_entry($bootloader, { type => "macos", kernel_or_dev => $partition_table::mac::macos_part }); } } elsif (arch() !~ /ia64/) { #- search for dos (or windows) boot partition. Do not look in extended partitions! my @windows_boot_parts = grep { $_->{active} && isFat_or_NTFS($_) && member(fs::type::fs_type_from_magic($_), 'vfat', 'ntfs', 'ntfs-3g') && !$_->{is_removable} && !isRecovery($_); } map { @{$_->{primary}{normal}} } @{$all_hds->{hds}}; each_index { add_entry($bootloader, { type => 'other', kernel_or_dev => "/dev/$_->{device}", label => 'windows' . ($::i || ''), table => "/dev/$_->{rootDevice}", makeactive => 1, }); } @windows_boot_parts; } my @preferred = map { "linux-$_" } 'p3-smp-64GB', 'secure', 'enterprise', 'smp', 'i686-up-4GB'; if (my $preferred = find { get_label($_, $bootloader) } @preferred) { $bootloader->{default} ||= $preferred; } $bootloader->{default} ||= "linux"; $bootloader->{method} ||= first(method_choices($all_hds, 1), # best installed method_choices($all_hds, 0)); # or best if no valid one is installed if (main_method($bootloader->{method}) eq 'grub') { foreach my $c (find_other_distros_grub_conf($fstab)) { add_entry($bootloader, { type => 'grub_configfile', label => $c->{name}, kernel_or_dev => "/dev/$c->{bootpart}{device}", configfile => $c->{grub_conf}, }); } } } sub detect_main_method { my ($all_hds) = @_; my $bootloader = &read($all_hds); $bootloader && main_method($bootloader->{method}); } sub main_method { my ($method) = @_; $method =~ /(\w+)/ && $1; } sub config_files() { my %files = ( lilo => '/etc/lilo.conf', grub => '/boot/grub/menu.lst', grub_install => '/boot/grub/install.sh', ); map_each { my $content = cat_("$::prefix/$::b"); { main_method => main_method($::a), name => $::a, file => $::b, content => $content }; } %files; } sub method2text { my ($method) = @_; +{ 'lilo-menu' => N("LILO with text menu"), 'grub-graphic' => N("GRUB with graphical menu"), 'grub-menu' => N("GRUB with text menu"), 'yaboot' => N("Yaboot"), 'silo' => N("SILO"), }->{$method}; } sub method_choices_raw { my ($b_prefix_mounted) = @_; detect_devices::is_xbox() ? 'cromwell' : arch() =~ /ppc/ ? 'yaboot' : arch() =~ /ia64/ ? 'lilo' : arch() =~ /sparc/ ? 'silo' : arch() =~ /mips/ ? 'pmon2000' : arch() =~ /arm/ ? 'uboot' : ( if_(!$b_prefix_mounted || whereis_binary('grub', $::prefix), 'grub-graphic', 'grub-menu'), if_(!$b_prefix_mounted || whereis_binary('lilo', $::prefix), 'lilo-menu'), ); } sub method_choices { my ($all_hds, $b_prefix_mounted) = @_; my $fstab = [ fs::get::fstab($all_hds) ]; my $root_part = fs::get::root($fstab); my $boot_part = fs::get::root($fstab, 'boot'); my $have_dmraid = find { fs::type::is_dmraid($_) } @{$all_hds->{hds}}; grep { !(/lilo/ && (isLoopback($root_part) || $have_dmraid)) && !(/grub/ && isRAID($boot_part)) && !(/grub-graphic/ && cat_("/proc/cmdline") =~ /console=ttyS/); } method_choices_raw($b_prefix_mounted); } sub main_method_choices { my ($b_prefix_mounted) = @_; uniq(map { main_method($_) } method_choices_raw($b_prefix_mounted)); } sub configured_main_methods() { my @bad_main_methods = map { if_(!$_->{content}, $_->{main_method}) } config_files(); difference2([ main_method_choices(1) ], \@bad_main_methods); } # for lilo sub keytable { my ($f) = @_; $f or return; if ($f !~ /\.klt$/) { my $file = "/boot/$f.klt"; run_program::rooted($::prefix, "keytab-lilo.pl", ">", $file, $f) or return; $f = $file; } -r "$::prefix/$f" && $f; } sub create_link_source() { #- we simply do it for all kernels :) #- so this can be used in %post of kernel and also of kernel-source foreach (all("$::prefix/usr/src")) { my ($version) = /^linux-(\d+\.\d+.*)/ or next; foreach (glob("$::prefix/lib/modules/$version*")) { -d $_ or next; log::l("creating symlink $_/build"); symlink "/usr/src/linux-$version", "$_/build"; log::l("creating symlink $_/source"); symlink "/usr/src/linux-$version", "$_/source"; } } } sub dev2yaboot { my ($dev) = @_; devices::make("$::prefix$dev"); #- create it in the chroot my $of_dev; run_program::rooted_or_die($::prefix, "/usr/sbin/ofpath", ">", \$of_dev, $dev); chomp($of_dev); log::l("OF Device: $of_dev"); $of_dev; } sub check_enough_space() { my $e = "$::prefix/boot/.enough_space"; output $e, 1; -s $e or die N("not enough room in /boot"); unlink $e; } sub write_yaboot { my ($bootloader, $all_hds) = @_; my $fstab = [ fs::get::fstab($all_hds) ]; my $file2yaboot = sub { my ($part, $file) = fs::get::file2part($fstab, $_[0]); dev2yaboot('/dev/' . $part->{device}) . "," . $file; }; #- do not write yaboot.conf for old-world macs my $mac_type = detect_devices::get_mac_model(); return if $mac_type =~ /Power Macintosh/; $bootloader->{prompt} ||= $bootloader->{timeout}; if ($bootloader->{message_text}) { eval { output("$::prefix/boot/message", $bootloader->{message_text}) } and $bootloader->{message} = '/boot/message'; } my @conf; if (!get_label($bootloader->{default}, $bootloader)) { log::l("default bootloader entry $bootloader->{default} is invalid, choosing another one"); $bootloader->{default} = $bootloader->{entries}[0]{label}; } push @conf, "# yaboot.conf - generated by DrakX/drakboot"; push @conf, "# WARNING: do not forget to run ybin after modifying this file\n"; push @conf, "default=" . make_label_lilo_compatible($bootloader->{default}) if $bootloader->{default}; push @conf, sprintf('init-message="\n%s\n"', $bootloader->{'init-message'}) if $bootloader->{'init-message'}; if ($bootloader->{boot}) { push @conf, "boot=$bootloader->{boot}"; push @conf, "ofboot=" . dev2yaboot($bootloader->{boot}) if $mac_type !~ /IBM/; } else { die "no bootstrap partition defined."; } push @conf, map { "$_=$bootloader->{$_}" } grep { $bootloader->{$_} } (qw(delay timeout), if_($mac_type !~ /IBM/, 'defaultos')); push @conf, "install=/usr/lib/yaboot/yaboot"; if ($mac_type =~ /IBM/) { push @conf, 'nonvram'; } else { push @conf, 'magicboot=/usr/lib/yaboot/ofboot'; push @conf, grep { $bootloader->{$_} } qw(enablecdboot enableofboot); } foreach my $entry (@{$bootloader->{entries}}) { if ($entry->{type} eq "image") { push @conf, "$entry->{type}=" . $file2yaboot->($entry->{kernel_or_dev}); my @entry_conf; push @entry_conf, "label=" . make_label_lilo_compatible($entry->{label}); push @entry_conf, "root=$entry->{root}"; push @entry_conf, "initrd=" . $file2yaboot->($entry->{initrd}) if $entry->{initrd}; #- xfs module on PPC requires larger initrd - say 6MB? push @entry_conf, "initrd-size=6144" if $bootloader->{xfsroot}; push @entry_conf, qq(append=" $entry->{append}") if $entry->{append}; push @entry_conf, grep { $entry->{$_} } qw(read-write read-only); push @conf, map { "\t$_" } @entry_conf; } else { my $of_dev = dev2yaboot($entry->{kernel_or_dev}); push @conf, "$entry->{type}=$of_dev"; } } my $f = "$::prefix/etc/yaboot.conf"; log::l("writing yaboot config to $f"); renamef($f, "$f.old"); output($f, map { "$_\n" } @conf); } sub install_yaboot { my ($bootloader, $all_hds) = @_; log::l("Installing boot loader..."); write_yaboot($bootloader, $all_hds); when_config_changed_yaboot($bootloader); } sub when_config_changed_yaboot { my ($bootloader) = @_; $::testing and return; if (defined $partition_table::mac::new_bootstrap) { run_program::run("hformat", $bootloader->{boot}) or die "hformat failed"; } my $error; run_program::rooted($::prefix, "/usr/sbin/ybin", "2>", \$error) or die "ybin failed: $error"; } sub install_pmon2000 { my ($_bootloader, $_all_hds) = @_; log::l("Mips/pmon2000 - nothing to install..."); } sub write_pmon2000 { my ($_bootloader, $_all_hds) = @_; log::l("Mips/pmon2000 - nothing to write..."); } sub when_config_changed_pmon2000 { my ($_bootloader) = @_; log::l("Mips/pmon2000 - nothing to do..."); } sub install_uboot { my ($_bootloader, $_all_hds) = @_; log::l("uboot - nothing to install..."); } sub write_uboot { my ($_bootloader, $_all_hds) = @_; log::l("uboot - nothing to write..."); } sub when_config_changed_uboot { my ($_bootloader) = @_; log::l("uboot - nothing to do..."); } sub install_cromwell { my ($_bootloader, $_all_hds) = @_; log::l("XBox/Cromwell - nothing to install..."); } sub write_cromwell { my ($_bootloader, $_all_hds) = @_; log::l("XBox/Cromwell - nothing to write..."); } sub when_config_changed_cromwell { my ($_bootloader) = @_; log::l("XBox/Cromwell - nothing to do..."); } sub simplify_label { my ($label) = @_; length($label) < 31 or $label =~ s/\.//g; $label = substr($label, 0, 31); #- lilo does not handle more than 31 char long labels $label =~ s/ /_/g; #- lilo does not support blank character in image names, labels or aliases $label; } sub make_label_lilo_compatible { my ($label) = @_; '"' . simplify_label($label) . '"'; } sub write_lilo { my ($bootloader, $all_hds, $o_backup_extension) = @_; $bootloader->{prompt} ||= $bootloader->{timeout}; my $file2fullname = sub { my ($file) = @_; if (arch() =~ /ia64/) { my $fstab = [ fs::get::fstab($all_hds) ]; (my $part, $file) = fs::get::file2part($fstab, $file); my %hds = map_index { $_ => "hd$::i" } map { $_->{device} } sort { my ($a_is_fat, $b_is_fat) = ($a->{fs_type} eq 'vfat', $b->{fs_type} eq 'vfat'); $a_is_fat <=> $b_is_fat || $a->{device} cmp $b->{device}; } @$fstab; $hds{$part->{device}} . ":" . $file; } else { $file; } }; my $quotes = sub { my ($s) = @_; $s =~ s/"/\\"/g; qq("$s"); }; my $quotes_if_needed = sub { my ($s) = @_; $s =~ /["=\s]/ ? $quotes->($s) : $s; }; my @sorted_hds = sort_hds_according_to_bios($bootloader, $all_hds); if (is_empty_hash_ref($bootloader->{bios} ||= {}) && $all_hds->{hds}[0] != $sorted_hds[0]) { log::l("Since we're booting on $sorted_hds[0]{device}, make it bios=0x80"); $bootloader->{bios} = { "/dev/$sorted_hds[0]{device}" => '0x80' }; } my @conf; #- normalize: RESTRICTED and MANDATORY are only valid if PASSWORD is set if ($bootloader->{password}) { # lilo defaults to mandatory, use restricted by default to have # the same behaviour as with grub $bootloader->{restricted} = 1; } else { delete $bootloader->{mandatory} if !$bootloader->{password}; delete $bootloader->{restricted} if !$bootloader->{password}; } foreach my $entry (@{$bootloader->{entries}}) { delete $entry->{mandatory} if !$entry->{password} && !$bootloader->{password}; delete $entry->{restricted} if !$entry->{password} && !$bootloader->{password}; } if (get_append_with_key($bootloader, 'console') =~ /ttyS(.*)/) { $bootloader->{serial} ||= $1; } if (!get_label($bootloader->{default}, $bootloader)) { log::l("default bootloader entry $bootloader->{default} is invalid, choosing another one"); $bootloader->{default} = $bootloader->{entries}[0]{label}; } push @conf, "# File generated by DrakX/drakboot"; push @conf, "# WARNING: do not forget to run lilo after modifying this file\n"; push @conf, "default=" . make_label_lilo_compatible($bootloader->{default}) if $bootloader->{default}; push @conf, map { $_ . '=' . $quotes_if_needed->($bootloader->{$_}) } grep { $bootloader->{$_} } qw(boot root map install serial vga keytable raid-extra-boot menu-scheme vmdefault); push @conf, grep { $bootloader->{$_} } qw(linear geometric compact prompt mandatory nowarn restricted static-bios-codes large-memory); push @conf, "append=" . $quotes->($bootloader->{append}) if $bootloader->{append}; push @conf, "password=" . $bootloader->{password} if $bootloader->{password}; #- also done by msec push @conf, "timeout=" . round(10 * $bootloader->{timeout}) if $bootloader->{timeout}; push @conf, "message=$bootloader->{message}" if $bootloader->{message}; push @conf, "ignore-table" if any { $_->{unsafe} && $_->{table} } @{$bootloader->{entries}}; push @conf, map_each { "disk=$::a bios=$::b" } %{$bootloader->{bios}}; foreach my $entry (@{$bootloader->{entries}}) { my $mbootpack_file = get_mbootpack_filename($entry); if ($mbootpack_file && !build_mbootpack($entry)) { warn "mbootpack is required for xen but unavailable, skipping\n"; next; } if ($entry->{type} eq 'grub_configfile') { next; } push @conf, "$entry->{type}=" . $file2fullname->($mbootpack_file || $entry->{kernel_or_dev}); my @entry_conf; push @entry_conf, "label=" . make_label_lilo_compatible($entry->{label}) if $entry->{label}; if ($entry->{type} eq "image") { push @entry_conf, 'root=' . $quotes_if_needed->($entry->{root}) if $entry->{root} && !$entry->{xen}; push @entry_conf, "initrd=" . $file2fullname->($entry->{initrd}) if $entry->{initrd} && !$mbootpack_file; my $append = join(' ', if_($entry->{xen_append}, $entry->{xen_append}), if_($entry->{xen}, '--', 'root=' . $entry->{root}), if_($entry->{append}, $entry->{append})); push @entry_conf, "append=" . $quotes->($append) if $append; push @entry_conf, "vga=$entry->{vga}" if $entry->{vga}; push @entry_conf, grep { $entry->{$_} } qw(read-write read-only optional); push @entry_conf, "mandatory" if $entry->{lock}; } else { delete $entry->{unsafe} if $entry->{table}; #- we can't have both push @entry_conf, map { "$_=$entry->{$_}" } grep { $entry->{$_} } qw(table boot-as); push @entry_conf, grep { $entry->{$_} } qw(unsafe master-boot); if ($entry->{table}) { #- hum, things like table=c: are needed for some os2 cases, #- in that case $hd below is undef my $hd = fs::get::device2part($entry->{table}, $all_hds->{hds}); if ($hd && $hd != $sorted_hds[0]) { #- boot off the nth drive, so reverse the BIOS maps my $nb = sprintf("0x%x", 0x80 + (find_index { $hd == $_ } @sorted_hds)); $entry->{mapdrive} ||= { '0x80' => $nb, $nb => '0x80' }; } } if ($entry->{mapdrive}) { push @entry_conf, map_each { "map-drive=$::a", " to=$::b" } %{$entry->{mapdrive}}; } } push @entry_conf, "password=$entry->{password}" if $entry->{password}; push @entry_conf, grep { $entry->{$_} } qw(mandatory vmwarn vmdisable); push @conf, map { "\t$_" } @entry_conf; } my $f = arch() =~ /ia64/ ? "$::prefix/boot/efi/elilo.conf" : "$::prefix/etc/lilo.conf"; log::l("writing lilo config to $f"); renamef($f, $f . ($o_backup_extension || '.old')); output_with_perm($f, $bootloader->{password} ? 0600 : 0644, map { "$_\n" } @conf); } sub install_lilo { my ($bootloader, $all_hds) = @_; if (my ($install) = $bootloader->{method} =~ /lilo-(text|menu)/) { $bootloader->{install} = $install; } else { delete $bootloader->{install}; } if ($bootloader->{message_text}) { output("$::prefix/boot/message-text", $bootloader->{message_text}); } my $message = "message-text"; if (-r "$::prefix/boot/$message") { symlinkf $message, "$::prefix/boot/message"; $bootloader->{message} = '/boot/message'; } #- ensure message does not contain the old graphic format if ($bootloader->{message} && -s "$::prefix$bootloader->{message}" > 65_000) { output("$::prefix$bootloader->{message}", ''); } write_lilo($bootloader, $all_hds); when_config_changed_lilo($bootloader); configure_kdm_BootManager('Lilo'); } sub install_raw_lilo { my ($o_force_answer) = @_; my $error; my $answer = $o_force_answer || ''; run_program::rooted($::prefix, "echo $answer | lilo", '2>', \$error) or die "lilo failed: $error"; } sub when_config_changed_lilo { my ($bootloader) = @_; if (!$::testing && arch() !~ /ia64/ && $bootloader->{method} =~ /lilo/) { log::l("Installing boot loader on $bootloader->{boot}..."); install_raw_lilo($bootloader->{force_lilo_answer}); } } #- NB: ide is lower than scsi, this is important for sort_hds_according_to_bios() sub hd2bios_kind { my ($hd) = @_; lc(join('_', $hd->{bus}, $hd->{host})); } sub ensafe_first_bios_drive { my ($hds) = @_; mixed_kind_of_disks($hds) || @$hds > 1 && _not_first_bios_drive($hds->[0]); } sub mixed_kind_of_disks { my ($hds) = @_; (uniq_ { hd2bios_kind($_) } @$hds) > 1; } sub _not_first_bios_drive { my ($hd) = @_; my $bios = $hd && $hd->{bios_from_edd}; $bios && $bios ne '80'; } sub sort_hds_according_to_bios { my ($bootloader, $all_hds) = @_; my $boot_hd = fs::get::device2part($bootloader->{first_hd_device} || $bootloader->{boot}, $all_hds->{hds}); #- $boot_hd is undefined when installing on floppy my $boot_kind = $boot_hd && hd2bios_kind($boot_hd); my $translate = sub { my ($hd) = @_; my $kind = hd2bios_kind($hd); $boot_hd ? ($hd == $boot_hd ? 0 : $kind eq $boot_kind ? 1 : 2) . "_$kind" : $kind; }; sort { $translate->($a) cmp $translate->($b) } @{$all_hds->{hds}}; } sub device_string2grub { my ($dev, $legacy_floppies, $sorted_hds) = @_; if (my $device = fs::get::device2part($dev, [ @$sorted_hds, fs::get::hds_fstab(@$sorted_hds) ])) { device2grub($device, $sorted_hds); } elsif (my $floppy = fs::get::device2part($dev, $legacy_floppies)) { my $bios = find_index { $floppy eq $_ } @$legacy_floppies; "(fd$bios)"; } else { internal_error("unknown device $dev"); } } sub device2grub { my ($device, $sorted_hds) = @_; if (isRAID($device) && $device->{level} == 1) { #- we can take any disk $device = $device->{disks}[0]; } my ($hd, $part_nb) = $device->{rootDevice} ? (fs::get::device2part($device->{rootDevice}, $sorted_hds), $device->{device} =~ /(\d+)$/) : $device; my $bios = eval { find_index { $hd eq $_ } @$sorted_hds }; if (defined $bios) { my $part_string = defined $part_nb ? ',' . ($part_nb - 1) : ''; "(hd$bios$part_string)"; } else { undef; } } sub read_grub_device_map() { my %grub2dev = map { m!\((.*)\)\s+/dev/(.*)$! } cat_("$::prefix/boot/grub/device.map"); \%grub2dev; } sub write_grub_device_map { my ($legacy_floppies, $sorted_hds) = @_; my $f = "$::prefix/boot/grub/device.map"; renamef($f, "$f.old"); output($f, (map_index { "(fd$::i) /dev/$_->{device}\n" } @$legacy_floppies), (map_index { "(hd$::i) /dev/$_->{device}\n" } @$sorted_hds)); } # parses things like "(hd0,4)/boot/vmlinuz" # returns: ("hd0", 4, "boot/vmlinuz") sub parse_grub_file { my ($grub_file) = @_; my ($grub_dev, $rel_file) = $grub_file =~ m!\((.*?)\)/?(.*)! or return; my ($hd, $part) = split(',', $grub_dev); ($hd, $part, $rel_file); } # takes things like "(hd0,4)/boot/vmlinuz" # returns: ("/dev/sda5", "boot/vmlinuz") sub grub2dev_and_file { my ($grub_file, $grub2dev, $o_block_device) = @_; my ($hd, $part, $rel_file) = parse_grub_file($grub_file) or return; $grub2dev->{$hd} or internal_error("$hd has no mapping in device.map (when translating $grub_file)"); $part = $o_block_device ? '' : defined $part && $part + 1; #- grub wants "(hdX,Y)" where lilo just want "hdY+1" my $device = '/dev/' . ($part eq '' ? $grub2dev->{$hd} : devices::prefix_for_dev($grub2dev->{$hd}) . $part); $device, $rel_file; } # takes things like "(hd0,4)/boot/vmlinuz" # returns: "/dev/sda5" sub grub2dev { my ($grub_file, $grub2dev, $o_block_device) = @_; first(grub2dev_and_file($grub_file, $grub2dev, $o_block_device)); } # replaces # - "/vmlinuz" with "/boot/vmlinuz" when "root" or "rootnoverify" is set for the entry # - "(hdX,Y)" in "(hdX,Y)/boot/vmlinuz..." by appropriate path if possible/needed sub grub2file { my ($grub_file, $grub2dev, $fstab, $o_entry) = @_; if ($grub_file =~ m!^/!) { my $root = $o_entry && ($o_entry->{rootnoverify} || $o_entry->{grub_root}); $root and $grub_file = "$root$grub_file"; } if (my ($device, $rel_file) = grub2dev_and_file($grub_file, $grub2dev)) { my $part = fs::get::device2part($device, $fstab); if (my $mntpoint = $part && $part->{mntpoint}) { ($mntpoint eq '/' ? '' : $mntpoint) . '/' . $rel_file; } else { log::l("ERROR: unknown device $device (computed from $grub_file)"); $grub_file; } } else { $grub_file; } } sub boot_copies_dir() { '/boot/copied' } sub create_copy_in_boot { my ($file) = @_; my $s = $file; $s =~ s!/!_!g; my $file2 = boot_copies_dir() . "/$s"; log::l("$file is not available at boot time, creating a copy ($file2)"); mkdir_p(boot_copies_dir()); output("$file2.link", $file . "\n"); update_copy_in_boot("$file2.link"); $file2; } sub update_copy_in_boot { my ($link) = @_; my $orig = chomp_(cat_("$::prefix$link")); (my $dest = $link) =~ s/\.link$// or internal_error("update_copy_in_boot: $link"); if (-e "$::prefix$orig") { log::l("updating $dest from $orig"); cp_af("$::prefix$orig", "$::prefix$dest"); } else { log::l("removing $dest since $orig does not exist anymore"); unlink "$::prefix$link", "$::prefix$orig"; } } sub crypt_grub_password { my ($password) = @_; require IPC::Open2; local $ENV{LC_ALL} = 'C'; my ($his_out, $his_in); my $cmd = ($::prefix ? "chroot $::prefix " : "") . "/sbin/grub-md5-crypt"; my $pid = IPC::Open2::open2($his_out, $his_in, $cmd); my ($line, $res); while (sysread($his_out, $line, 100)) { if ($line =~ /Password/i) { syswrite($his_in, "$password\n"); } else { $res = $line; } } waitpid($pid, 0); my $status = $? >> 8; die "failed to encrypt password (status=$status)" if $status != 0; chomp_($res); } sub write_grub { my ($bootloader, $all_hds, $o_backup_extension) = @_; my $fstab = [ fs::get::fstab($all_hds) ]; my @legacy_floppies = detect_devices::floppies(); my @sorted_hds = sort_hds_according_to_bios($bootloader, $all_hds); write_grub_device_map(\@legacy_floppies, \@sorted_hds); my $file2grub; $file2grub = sub { my ($file) = @_; if ($file =~ m!^\(.*\)/!) { $file; #- it's already in grub format } else { my ($part, $rel_file) = fs::get::file2part($fstab, $file, 'keep_simple_symlinks'); if (my $grub = device2grub($part, \@sorted_hds)) { $grub . $rel_file; } elsif (!begins_with($file, '/boot/')) { log::l("$file is on device $part->{device} which is not available at boot time. Copying it"); $file2grub->(create_copy_in_boot($file)); } else { log::l("ERROR: $file is on device $part->{device} which is not available at boot time. Defaulting to a dumb value"); "(hd0,0)$file"; } } }; if (get_append_with_key($bootloader, 'console') =~ /ttyS(\d),(\d+)/) { $bootloader->{serial} ||= "--unit=$1 --speed=$2"; $bootloader->{terminal} ||= "--timeout=" . ($bootloader->{timeout} || 0) . " console serial"; } elsif ($bootloader->{method} eq 'grub-graphic') { my $bin = '/usr/sbin/grub-gfxmenu'; if ($bootloader->{gfxmenu} eq '' && -x "$::prefix$bin") { my $locale = $::o->{locale} || do { require lang; lang::read() }; run_program::rooted($::prefix, $bin, '--lang', $locale->{lang}, '--update-gfxmenu'); $bootloader->{gfxmenu} ||= '/boot/gfxmenu'; } #- not handled anymore delete $bootloader->{$_} foreach qw(splashimage viewport shade); } else { delete $bootloader->{gfxmenu}; } my $format = sub { map { "$_ $bootloader->{$_}" } @_ }; { my @conf; if ($bootloader->{password}) { if (!is_already_crypted($bootloader->{password})) { my $encrypted = crypt_grub_password($bootloader->{password}); $bootloader->{password} = "--md5 $encrypted"; } } push @conf, $format->(grep { defined $bootloader->{$_} } qw(timeout)); push @conf, $format->(grep { $bootloader->{$_} } qw(color password serial shade terminal viewport background foreground)); push @conf, map { $_ . ' ' . $file2grub->($bootloader->{$_}) } grep { $bootloader->{$_} } qw(gfxmenu); eval { push @conf, "default " . (find_index { $_->{label} eq $bootloader->{default} } @{$bootloader->{entries}}); }; foreach my $entry (@{$bootloader->{entries}}) { my $title = "\ntitle $entry->{label}"; if ($entry->{keep_verbatim}) { push @conf, '', $entry->{verbatim}; } elsif ($entry->{type} eq "image") { push @conf, $title; push @conf, grep { $entry->{$_} } 'lock'; push @conf, join(' ', 'kernel', $file2grub->($entry->{xen}), $entry->{xen_append}) if $entry->{xen}; my $vga = $entry->{vga} || $bootloader->{vga}; push @conf, join(' ', $entry->{xen} ? 'module' : 'kernel', $file2grub->($entry->{kernel_or_dev}), $entry->{xen} ? () : 'BOOT_IMAGE=' . simplify_label($entry->{label}), if_($entry->{root}, $entry->{root} =~ /loop7/ ? "root=707" : "root=$entry->{root}"), #- special to workaround bug in kernel (see #ifdef CONFIG_BLK_DEV_LOOP) $entry->{append}, if_($entry->{'read-write'}, 'rw'), if_($vga && $vga ne "normal", "vga=$vga")); push @conf, "module " . $_ foreach @{$entry->{modules} || []}; push @conf, join(' ', $entry->{xen} ? 'module' : 'initrd', $file2grub->($entry->{initrd})) if $entry->{initrd}; } else { my $dev = eval { device_string2grub($entry->{kernel_or_dev}, \@legacy_floppies, \@sorted_hds) }; if (!$dev) { log::l("dropping bad entry $entry->{label} for unknown device $entry->{kernel_or_dev}"); next; } push @conf, $title; push @conf, grep { $entry->{$_} } 'lock'; push @conf, join(' ', $entry->{rootnoverify} ? 'rootnoverify' : 'root', $dev); if ($entry->{table}) { if (my $hd = fs::get::device2part($entry->{table}, \@sorted_hds)) { if (my $bios = find_index { $hd eq $_ } @sorted_hds) { #- boot off the nth drive, so reverse the BIOS maps my $nb = sprintf("0x%x", 0x80 + $bios); $entry->{mapdrive} ||= { '0x80' => $nb, $nb => '0x80' }; } } } if ($entry->{mapdrive}) { push @conf, map_each { "map ($::b) ($::a)" } %{$entry->{mapdrive}}; } push @conf, "makeactive" if $entry->{makeactive}; if ($entry->{type} eq 'grub_configfile') { push @conf, "configfile $entry->{configfile}"; } else { push @conf, "chainloader +1"; } } } my $f = "$::prefix/boot/grub/menu.lst"; log::l("writing grub config to $f"); renamef($f, $f . ($o_backup_extension || '.old')); output_with_perm($f, 0600, map { "$_\n" } @conf); } { my $f = "$::prefix/boot/grub/install.sh"; my $boot_dev = device_string2grub($bootloader->{boot}, \@legacy_floppies, \@sorted_hds); my $files_dev = device2grub(fs::get::root_($fstab, 'boot'), \@sorted_hds); renamef($f, $f . ($o_backup_extension || '.old')); output_with_perm($f, 0755, "grub --device-map=/boot/grub/device.map --batch <<EOF root $files_dev setup --stage2=/boot/grub/stage2 $boot_dev quit EOF "); } check_enough_space(); } sub configure_kdm_BootManager { my ($name) = @_; eval { common::update_gnomekderc_no_create("$::prefix/etc/kde/kdm/kdmrc", 'Shutdown' => ( BootManager => $name )) }; } sub sync_partition_data_to_disk { my ($part) = @_; common::sync(); if ($part->{fs_type} eq 'xfs') { run_program::rooted($::prefix, 'xfs_freeze', '-f', $part->{mntpoint}); run_program::rooted($::prefix, 'xfs_freeze', '-u', $part->{mntpoint}); } } sub _dev_to_MBR_backup { my ($dev) = @_; $dev =~ s!/dev/!!; $dev =~ s!/!_!g; "$::prefix/boot/boot.backup.$dev"; } sub save_previous_MBR_bootloader { my ($dev) = @_; my $t; open(my $F, $dev); CORE::read($F, $t, 0x1b8); #- up to disk magic output(_dev_to_MBR_backup($dev), $t); } sub restore_previous_MBR_bootloader { my ($dev) = @_; log::l("restoring previous bootloader on $dev"); output($dev, scalar cat_(_dev_to_MBR_backup($dev))); } sub install_grub { my ($bootloader, $all_hds) = @_; write_grub($bootloader, $all_hds); if (!$::testing) { if ($bootloader->{previous_boot} && $bootloader->{previous_boot} eq $bootloader->{boot}) { # nothing to do (already installed in {boot}) } else { if ($bootloader->{previous_boot}) { restore_previous_MBR_bootloader(delete $bootloader->{previous_boot}); } if (fs::get::device2part($bootloader->{boot}, [ fs::get::hds($all_hds) ])) { save_previous_MBR_bootloader($bootloader->{boot}); $bootloader->{previous_boot} = $bootloader->{boot}; } } my @files = grep { /(stage1|stage2|_stage1_5)$/ } glob("$::prefix/lib/grub/*/*"); cp_af(@files, "$::prefix/boot/grub"); sync_partition_data_to_disk(fs::get::root([ fs::get::fstab($all_hds) ], 'boot')); install_raw_grub(); } configure_kdm_BootManager('Grub'); } sub install_raw_grub() { log::l("Installing boot loader..."); my $error; run_program::rooted($::prefix, "sh", "2>", \$error, '/boot/grub/install.sh') or die "grub failed: $error"; } sub when_config_changed_grub { my ($_bootloader) = @_; #- do not do anything update_copy_in_boot($_) foreach glob($::prefix . boot_copies_dir() . '/*.link'); } sub action { my ($bootloader, $action, @para) = @_; my $main_method = main_method($bootloader->{method}); my $f = $bootloader::{$action . '_' . $main_method} or die "unknown bootloader method $bootloader->{method} ($action)"; $f->($bootloader, @para); } sub install { my ($bootloader, $all_hds) = @_; if (my $part = fs::get::device2part($bootloader->{boot}, [ fs::get::fstab($all_hds) ])) { die N("You cannot install the bootloader on a %s partition\n", $part->{fs_type}) if $part->{fs_type} eq 'xfs'; } $bootloader->{keytable} = keytable($bootloader->{keytable}); action($bootloader, 'install', $all_hds); } sub ensure_pkg_is_installed { my ($do_pkgs, $bootloader) = @_; my $main_method = main_method($bootloader->{method}); if ($main_method eq 'grub' || $main_method eq 'lilo') { $do_pkgs->ensure_binary_is_installed($main_method, $main_method, 1) or return 0; if ($bootloader->{method} eq 'grub-graphic') { $do_pkgs->ensure_is_installed('mageia-gfxboot-theme', '/usr/share/gfxboot/themes/Mageia/boot/message', 1) or return 0; } } 1; } sub find_other_distros_grub_conf { my ($fstab) = @_; my @unknown_true_fs = grep { isTrueLocalFS($_) && (!$_->{mntpoint} || !member($_->{mntpoint}, '/home', fs::type::directories_needed_to_boot())); } @$fstab; log::l("looking for configured grub on partitions " . join(' ', map { $_->{device} } @unknown_true_fs)); my @l; foreach my $part (@unknown_true_fs) { my $handle = any::inspect($part, $::prefix) or next; foreach my $bootdir ('', '/boot') { my $f = find { -e "$handle->{dir}$bootdir/$_" } 'grub.conf', 'grub/menu.lst' or next; push @l, { bootpart => $part, bootdir => $bootdir, grub_conf => "$bootdir/$f" }; } if (my $f = common::release_file($handle->{dir})) { my $h = common::parse_release_file($handle->{dir}, $f, $part); $h->{name} = $h->{release}; push @l, $h; } elsif ($handle && -e "$handle->{dir}/etc/issue") { my ($s, $dropped) = cat_("$handle->{dir}/etc/issue") =~ /^([^\\\n]*)(.*)/; log::l("found /etc/issue: $s (removed: $dropped)"); push @l, { name => $s, part => $part }; } } my $root; my $set_root = sub { my ($v) = @_; $root and log::l("don't know what to do with $root->{name} ($root->{part}{device})"); $root = $v; }; my @found; while (my $e = shift @l) { if ($e->{name}) { $set_root->($e); } else { if (@l && $l[0]{name}) { $set_root->(shift @l); } my $ok; if ($root && $root->{part} == $e->{bootpart} && $e->{bootdir}) { # easy case: /boot is not a separate partition $ok = 1; } elsif ($root && $root->{part} != $e->{bootpart} && !$e->{bootdir}) { log::l("associating '/' $root->{part}{device} with '/boot' $e->{bootpart}{device}"); $ok = 1; } if ($ok) { add2hash($e, $root); undef $root; } elsif ($root) { log::l("weird case for grub conf in $e->{bootpart}{device}, keeping '/' from $root->{part}{device}"); } else { log::l("could not recognise the distribution for $e->{grub_conf} in $e->{bootpart}{device}"); } $e->{name} ||= "Linux $e->{bootpart}{device}"; push @found, $e; } } $set_root->(undef); @found; } sub update_for_renumbered_partitions { my ($in, $renumbering, $all_hds) = @_; my @configs = grep { $_->{content} } config_files(); $_->{new} = $_->{orig} = $_->{content} foreach @configs; my @sorted_hds; { my $grub2dev = read_grub_device_map(); map_each { $sorted_hds[$1] = fs::get::device2part($::b, $all_hds->{hds}) if $::a =~ /hd(\d+)/; } %$grub2dev; } #- NB: we make the changes with an added string inside so that hda5 is only renamed once to hda6 foreach (@$renumbering) { my ($old, $new) = @$_; log::l("renaming $old -> $new"); (my $lnew = $new) =~ s/(\d+)$/__DRAKX_DONE__$1/; $_->{new} =~ s/\b$old/$lnew/g foreach @configs; any { $_->{name} eq 'grub' } @configs or next; my ($old_grub, $new_grub) = map { device_string2grub($_, [], \@sorted_hds) } $old, $new; log::l("renaming $old_grub -> $new_grub"); (my $lnew_grub = $new_grub) =~ s/\)$/__DRAKX_DONE__)/; $_->{new} =~ s/\Q$old_grub/$lnew_grub/g foreach @configs; } $_->{new} =~ s/__DRAKX_DONE__//g foreach @configs; my @changed_configs = grep { $_->{orig} ne $_->{new} } @configs or return 1; # no need to update $in->ask_okcancel('', N("Your bootloader configuration must be updated because partition has been renumbered")) or return; foreach (@changed_configs) { renamef("$::prefix/$_->{file}", "$::prefix/$_->{file}.old"); output("$::prefix/$_->{file}", $_->{new}); } my $main_method = detect_main_method($all_hds); my @needed = map { $_ eq 'grub' ? 'grub_install' : $_; } $main_method ? $main_method : ('lilo', 'grub'); if (intersection(\@needed, [ map { $_->{name} } @changed_configs ])) { $in->ask_warn('', N("The bootloader cannot be installed correctly. You have to boot rescue and choose \"%s\"", N("Re-install Boot Loader"))); } 1; } 1;