summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/bg.po
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/po/bg.po')
-rw-r--r--perl-install/share/po/bg.po204
1 files changed, 107 insertions, 97 deletions
diff --git a/perl-install/share/po/bg.po b/perl-install/share/po/bg.po
index 143f27697..446954d35 100644
--- a/perl-install/share/po/bg.po
+++ b/perl-install/share/po/bg.po
@@ -11,7 +11,7 @@
msgid ""
msgstr ""
"Project-Id-Version: DrakX-bg\n"
-"POT-Creation-Date: 2012-09-18 13:37+0200\n"
+"POT-Creation-Date: 2012-12-11 17:29+0100\n"
"PO-Revision-Date: 2009-03-21 13:58+0200\n"
"Last-Translator: Kolio Kolev <kolio_kolev@biotronica.net>\n"
"Language-Team: Bulgarian <Mageia User Group - Bulgaria <mandriva-"
@@ -27,7 +27,7 @@ msgstr ""
#: diskdrake/interactive.pm:869 diskdrake/interactive.pm:931
#: diskdrake/interactive.pm:1036 diskdrake/interactive.pm:1266
#: diskdrake/interactive.pm:1324 do_pkgs.pm:242 do_pkgs.pm:287
-#: harddrake/sound.pm:270 interactive.pm:587 pkgs.pm:285
+#: harddrake/sound.pm:270 interactive.pm:588 pkgs.pm:287
#, c-format
msgid "Please wait"
msgstr "Моля, изчакайте"
@@ -111,7 +111,7 @@ msgstr "Първия сектор на дисковия дял (PBS) с Mageia"
msgid "On Floppy"
msgstr "Запазване на дискета"
-#: any.pm:376 pkgs.pm:281 ugtk2.pm:526
+#: any.pm:376 pkgs.pm:283 ugtk2.pm:526
#, c-format
msgid "Skip"
msgstr "Пропусни"
@@ -501,47 +501,47 @@ msgstr "Изберете подразбиращ се потребител:"
msgid "Choose the window manager to run:"
msgstr "Изберете графична среда за стартиране:"
-#: any.pm:1018 any.pm:1038 any.pm:1106
+#: any.pm:1018 any.pm:1032 any.pm:1100
#, c-format
msgid "Release Notes"
msgstr "Бележки към версията"
-#: any.pm:1045 any.pm:1394 interactive/gtk.pm:817
+#: any.pm:1039 any.pm:1389 interactive/gtk.pm:817
#, c-format
msgid "Close"
msgstr "Затвори"
-#: any.pm:1092
+#: any.pm:1086
#, c-format
msgid "License agreement"
msgstr "Лицензионен договор"
-#: any.pm:1094 diskdrake/dav.pm:26
+#: any.pm:1088 diskdrake/dav.pm:26
#, c-format
msgid "Quit"
msgstr "Изход"
-#: any.pm:1101
+#: any.pm:1095
#, c-format
msgid "Do you accept this license ?"
msgstr "Приемате ли този лиценз ?"
-#: any.pm:1102
+#: any.pm:1096
#, c-format
msgid "Accept"
msgstr "Приеми"
-#: any.pm:1102
+#: any.pm:1096
#, c-format
msgid "Refuse"
msgstr "Откажи"
-#: any.pm:1128 any.pm:1190
+#: any.pm:1122 any.pm:1185
#, c-format
msgid "Please choose a language to use"
msgstr "Моля, изберете език"
-#: any.pm:1156
+#: any.pm:1150
#, fuzzy, c-format
msgid ""
"%s can support multiple languages. Select\n"
@@ -552,82 +552,87 @@ msgstr ""
"езиците, които искате да инсталирате. Те ще бъдат налични след\n"
"като завърши инсталацията и рестартирате системата."
-#: any.pm:1158 fs/partitioning_wizard.pm:174
+#: any.pm:1152 fs/partitioning_wizard.pm:174
#, c-format
msgid "Mageia"
msgstr "Mageia"
-#: any.pm:1159
+#: any.pm:1153
#, fuzzy, c-format
msgid "Multiple languages"
msgstr "Многоезикова поддръжка"
-#: any.pm:1168 any.pm:1199
+#: any.pm:1154
+#, c-format
+msgid "Select Additional Languages"
+msgstr ""
+
+#: any.pm:1163 any.pm:1194
#, c-format
msgid "Old compatibility (non UTF-8) encoding"
msgstr "Съвместимост с преди използващи се (различни от UTF-8) кодировки"
-#: any.pm:1169
+#: any.pm:1164
#, c-format
msgid "All languages"
msgstr "Всички езици"
-#: any.pm:1191
+#: any.pm:1186
#, c-format
msgid "Language choice"
msgstr "Избор на език"
-#: any.pm:1245
+#: any.pm:1240
#, c-format
msgid "Country / Region"
msgstr "Страна / Регион"
-#: any.pm:1246
+#: any.pm:1241
#, c-format
msgid "Please choose your country"
msgstr "Моля, изберете вашата държава"
-#: any.pm:1248
+#: any.pm:1243
#, c-format
msgid "Here is the full list of available countries"
msgstr "Пълен списък на достръпните страни"
-#: any.pm:1249
+#: any.pm:1244
#, c-format
msgid "Other Countries"
msgstr "Други държави"
-#: any.pm:1249 interactive.pm:488 interactive/gtk.pm:445
+#: any.pm:1244 interactive.pm:489 interactive/gtk.pm:445
#, c-format
msgid "Advanced"
msgstr "Разширени настройки"
-#: any.pm:1255
+#: any.pm:1250
#, c-format
msgid "Input method:"
msgstr " Метод за въвеждане:"
-#: any.pm:1258
+#: any.pm:1253
#, c-format
msgid "None"
msgstr "Няма"
-#: any.pm:1339
+#: any.pm:1334
#, c-format
msgid "No sharing"
msgstr "Без споделяне"
-#: any.pm:1339
+#: any.pm:1334
#, c-format
msgid "Allow all users"
msgstr "Позволи на всички потребители"
-#: any.pm:1339
+#: any.pm:1334
#, c-format
msgid "Custom"
msgstr "Позволи на отделни потребители"
-#: any.pm:1343
+#: any.pm:1338
#, c-format
msgid ""
"Would you like to allow users to share some of their directories?\n"
@@ -644,7 +649,7 @@ msgstr ""
"\"Позволи на отделни потребители\" разрешава споделянето само на "
"потребителите, които са членове на групата \"fileshare\".\n"
-#: any.pm:1355
+#: any.pm:1350
#, c-format
msgid ""
"NFS: the traditional Unix file sharing system, with less support on Mac and "
@@ -654,7 +659,7 @@ msgstr ""
"ограничено \n"
" приложима за Mac OS X и Windows."
-#: any.pm:1358
+#: any.pm:1353
#, c-format
msgid ""
"SMB: a file sharing system used by Windows, Mac OS X and many modern Linux "
@@ -664,7 +669,7 @@ msgstr ""
"повечето\n"
" съвременни Linux системи."
-#: any.pm:1366
+#: any.pm:1361
#, c-format
msgid ""
"You can export using NFS or SMB. Please select which you would like to use."
@@ -672,12 +677,12 @@ msgstr ""
"Вие може да споделяте файлове използвайки NFS или SMB протоколи. \n"
"Моля, изберете кой от тях ще използвате."
-#: any.pm:1394
+#: any.pm:1389
#, c-format
msgid "Launch userdrake"
msgstr "Стартира userdrake"
-#: any.pm:1396
+#: any.pm:1391
#, c-format
msgid ""
"The per-user sharing uses the group \"fileshare\". \n"
@@ -686,7 +691,7 @@ msgstr ""
"За споделянето на потребителски директории използва група \"fileshare\".\n"
"Може да използвате userdrake, за да добавите потребител към тази група."
-#: any.pm:1503
+#: any.pm:1498
#, fuzzy, c-format
msgid ""
"You need to logout and back in again for changes to take effect. Press OK to "
@@ -695,49 +700,49 @@ msgstr ""
"За да се активират направените промени е необходимо да излезете от текущата "
"сесия и отново да влезете"
-#: any.pm:1507
+#: any.pm:1502
#, c-format
msgid "You need to log out and back in again for changes to take effect"
msgstr ""
"За да се активират направените промени е необходимо да излезете от текущата "
"сесия и отново да влезете"
-#: any.pm:1542
+#: any.pm:1537
#, c-format
msgid "Timezone"
msgstr "Часова зона"
-#: any.pm:1542
+#: any.pm:1537
#, c-format
msgid "Which is your timezone?"
msgstr "Коя е вашата времевата зона?"
-#: any.pm:1565 any.pm:1567
+#: any.pm:1560 any.pm:1562
#, c-format
msgid "Date, Clock & Time Zone Settings"
msgstr "Дата, Часовник и Настройки на часова зона"
-#: any.pm:1568
+#: any.pm:1563
#, c-format
msgid "What is the best time?"
msgstr "Кое е най-доброто време?"
-#: any.pm:1572
+#: any.pm:1567
#, c-format
msgid "%s (hardware clock set to UTC)"
msgstr "%s (хадруерният часовник е настроен по GMT)"
-#: any.pm:1573
+#: any.pm:1568
#, c-format
msgid "%s (hardware clock set to local time)"
msgstr "%s (хадруерният часовник е настроен по локалното време)"
-#: any.pm:1575
+#: any.pm:1570
#, c-format
msgid "NTP Server"
msgstr "NTP сървър"
-#: any.pm:1576
+#: any.pm:1571
#, c-format
msgid "Automatic time synchronization (using NTP)"
msgstr "Автоматична синхронизация на времето (използва NTP)"
@@ -1064,7 +1069,7 @@ msgstr "Парола за администратор на домейн"
# so use only 7bit for this message (and do transliteration or
# leave it in English, as it is the best for your language)
#. -PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit)
-#: bootloader.pm:991
+#: bootloader.pm:998
#, c-format
msgid ""
"Welcome to the operating system chooser!\n"
@@ -1079,42 +1084,47 @@ msgstr ""
"изчакайте да се зареди избраната по подразбиране.\n"
"\n"
-#: bootloader.pm:1169
+#: bootloader.pm:1190
#, c-format
msgid "LILO with text menu"
msgstr "LILO с текстово меню"
-#: bootloader.pm:1170
+#: bootloader.pm:1191
+#, fuzzy, c-format
+msgid "GRUB2 with graphical menu"
+msgstr "GRUB в графично меню"
+
+#: bootloader.pm:1192
#, c-format
msgid "GRUB with graphical menu"
msgstr "GRUB в графично меню"
-#: bootloader.pm:1171
+#: bootloader.pm:1193
#, c-format
msgid "GRUB with text menu"
msgstr "GRUB с текстово меню"
-#: bootloader.pm:1172
+#: bootloader.pm:1194
#, c-format
msgid "Yaboot"
msgstr "Yaboot"
-#: bootloader.pm:1173
+#: bootloader.pm:1195
#, c-format
msgid "SILO"
msgstr "SILO"
-#: bootloader.pm:1257
+#: bootloader.pm:1281
#, c-format
msgid "not enough room in /boot"
msgstr "няма достатъчно място в /boot"
-#: bootloader.pm:1983
+#: bootloader.pm:2030
#, c-format
msgid "You cannot install the bootloader on a %s partition\n"
msgstr "Не можете да инсталирате програмата за начално зареждане на дяла %s\n"
-#: bootloader.pm:2104
+#: bootloader.pm:2197
#, c-format
msgid ""
"Your bootloader configuration must be updated because partition has been "
@@ -1123,7 +1133,7 @@ msgstr ""
"Конфигурацията на програмата за начално зареждане трябва да се актуализира, "
"защото дисковите дялове бяха преномерирани"
-#: bootloader.pm:2117
+#: bootloader.pm:2210
#, c-format
msgid ""
"The bootloader cannot be installed correctly. You have to boot rescue and "
@@ -1132,7 +1142,7 @@ msgstr ""
"Програмата за начално зареждане не може да бъде коректно инсталирана. Трябва "
"да стартирате режим rescue и да изберете \"%s\""
-#: bootloader.pm:2118
+#: bootloader.pm:2211
#, c-format
msgid "Re-install Boot Loader"
msgstr "Преинсталиране на програмата за начално зареждане"
@@ -1231,7 +1241,7 @@ msgstr "Точка на монтиране"
msgid "Options"
msgstr "Опции"
-#: diskdrake/dav.pm:68 interactive.pm:387 interactive/gtk.pm:453
+#: diskdrake/dav.pm:68 interactive.pm:388 interactive/gtk.pm:453
#, c-format
msgid "Remove"
msgstr "Премахване"
@@ -1338,7 +1348,7 @@ msgstr "Изход"
msgid "Continue"
msgstr "Продължи"
-#: diskdrake/hd_gtk.pm:188 fs/partitioning_wizard.pm:555 interactive.pm:653
+#: diskdrake/hd_gtk.pm:188 fs/partitioning_wizard.pm:555 interactive.pm:654
#: interactive/gtk.pm:809 interactive/gtk.pm:827 interactive/gtk.pm:848
#: ugtk2.pm:936
#, c-format
@@ -2269,7 +2279,7 @@ msgstr "Криптиращ алгоритъм"
msgid "Change type"
msgstr "Промяни типа"
-#: diskdrake/smbnfs_gtk.pm:81 interactive.pm:129 interactive.pm:550
+#: diskdrake/smbnfs_gtk.pm:81 interactive.pm:130 interactive.pm:551
#: interactive/curses.pm:267 interactive/http.pm:104 interactive/http.pm:160
#: interactive/stdio.pm:39 interactive/stdio.pm:148 mygtk2.pm:846 ugtk2.pm:415
#: ugtk2.pm:517 ugtk2.pm:526 ugtk2.pm:812
@@ -2352,7 +2362,7 @@ msgstr "Следните пакети ще трябва да се инстали
msgid "Installing packages..."
msgstr "Инсталиране на пакети ..."
-#: do_pkgs.pm:287 pkgs.pm:285
+#: do_pkgs.pm:287 pkgs.pm:287
#, c-format
msgid "Removing packages..."
msgstr "Премахване на пакети ..."
@@ -2377,22 +2387,22 @@ msgstr "Трябва да имате FAT дял монтиран в /boot/efi"
msgid "Creating and formatting file %s"
msgstr "Създаване и форматиране на файл %s"
-#: fs/format.pm:130
+#: fs/format.pm:131
#, c-format
msgid "I do not know how to set label on %s with type %s"
msgstr "Не може да се зададе име на %s имащо тип %s"
-#: fs/format.pm:142
+#: fs/format.pm:143
#, fuzzy, c-format
msgid "setting label on %s failed, is it formatted?"
msgstr "Провали се задаването на име на %s "
-#: fs/format.pm:183
+#: fs/format.pm:184
#, c-format
msgid "I do not know how to format %s in type %s"
msgstr "Не може да се форматира %s в тип %s"
-#: fs/format.pm:188 fs/format.pm:190
+#: fs/format.pm:189 fs/format.pm:191
#, c-format
msgid "%s formatting of %s failed"
msgstr "%s форматиране от %s провалено"
@@ -2407,22 +2417,22 @@ msgstr "\"Омагьосан кръг\" от монтирания %s\n"
msgid "Mounting partition %s"
msgstr "Монтиране на дисков дял %s"
-#: fs/mount.pm:86
+#: fs/mount.pm:87
#, c-format
msgid "mounting partition %s in directory %s failed"
msgstr " пропадна монтирането на дисков дял %s в директория %s"
-#: fs/mount.pm:91 fs/mount.pm:108
+#: fs/mount.pm:92 fs/mount.pm:109
#, c-format
msgid "Checking %s"
msgstr "Проверка на %s"
-#: fs/mount.pm:125 partition_table.pm:422
+#: fs/mount.pm:126 partition_table.pm:422
#, c-format
msgid "error unmounting %s: %s"
msgstr "грешка при демонтиране на %s: %s"
-#: fs/mount.pm:140
+#: fs/mount.pm:141
#, c-format
msgid "Enabling swap partition %s"
msgstr "Позволи ползването на swap дял %s"
@@ -2670,7 +2680,7 @@ msgstr ""
#. -PO: keep the double empty lines between sections, this is formatted a la LaTeX
#: fs/partitioning_wizard.pm:191 fs/partitioning_wizard.pm:559
-#: interactive.pm:549 interactive/curses.pm:270 ugtk2.pm:519
+#: interactive.pm:550 interactive/curses.pm:270 ugtk2.pm:519
#, c-format
msgid "Next"
msgstr "Следващ"
@@ -3398,7 +3408,7 @@ msgstr "Модел на карта:"
msgid "Tuner type:"
msgstr "Тип на тунер:"
-#: interactive.pm:128 interactive.pm:549 interactive/curses.pm:270
+#: interactive.pm:129 interactive.pm:550 interactive/curses.pm:270
#: interactive/http.pm:103 interactive/http.pm:156 interactive/stdio.pm:39
#: interactive/stdio.pm:148 interactive/stdio.pm:149 mygtk2.pm:846
#: ugtk2.pm:421 ugtk2.pm:519 ugtk2.pm:812 ugtk2.pm:835
@@ -3406,37 +3416,37 @@ msgstr "Тип на тунер:"
msgid "Ok"
msgstr "Готово"
-#: interactive.pm:228 modules/interactive.pm:72 ugtk2.pm:811 wizards.pm:157
+#: interactive.pm:229 modules/interactive.pm:72 ugtk2.pm:811 wizards.pm:157
#, c-format
msgid "Yes"
msgstr "Да"
-#: interactive.pm:228 modules/interactive.pm:72 ugtk2.pm:811 wizards.pm:157
+#: interactive.pm:229 modules/interactive.pm:72 ugtk2.pm:811 wizards.pm:157
#, c-format
msgid "No"
msgstr "Не"
-#: interactive.pm:262
+#: interactive.pm:263
#, c-format
msgid "Choose a file"
msgstr "Изберете файл"
-#: interactive.pm:387 interactive/gtk.pm:453
+#: interactive.pm:388 interactive/gtk.pm:453
#, c-format
msgid "Add"
msgstr "Добавяне"
-#: interactive.pm:387 interactive/gtk.pm:453
+#: interactive.pm:388 interactive/gtk.pm:453
#, c-format
msgid "Modify"
msgstr "Промяна"
-#: interactive.pm:549 interactive/curses.pm:270 ugtk2.pm:519
+#: interactive.pm:550 interactive/curses.pm:270 ugtk2.pm:519
#, c-format
msgid "Finish"
msgstr "Край"
-#: interactive.pm:550 interactive/curses.pm:267 ugtk2.pm:517
+#: interactive.pm:551 interactive/curses.pm:267 ugtk2.pm:517
#, c-format
msgid "Previous"
msgstr "Предишен"
@@ -5231,7 +5241,7 @@ msgstr ""
"Трябва да се пренаредят основните дялове, така че да се освободи място до "
"разширените дялове."
-#: partition_table/raw.pm:288
+#: partition_table/raw.pm:296
#, c-format
msgid ""
"Something bad is happening on your hard disk drive. \n"
@@ -5243,22 +5253,22 @@ msgstr ""
"Проверката за цялост на данните не е успешна.\n"
"Това означава, че върху диска ще се записват случайни или повредени данни."
-#: pkgs.pm:252 pkgs.pm:255 pkgs.pm:268
+#: pkgs.pm:254 pkgs.pm:257 pkgs.pm:270
#, c-format
msgid "Unused packages removal"
msgstr "Премахване на неизползвани пакети"
-#: pkgs.pm:252
+#: pkgs.pm:254
#, c-format
msgid "Finding unused hardware packages..."
msgstr "Откриване на неизползвани пакети с драйвери за хардуерни устройства"
-#: pkgs.pm:255
+#: pkgs.pm:257
#, c-format
msgid "Finding unused localization packages..."
msgstr "Откриване на неизползвани пакети за локализация"
-#: pkgs.pm:269
+#: pkgs.pm:271
#, c-format
msgid ""
"We have detected that some packages are not needed for your system "
@@ -5267,17 +5277,17 @@ msgstr ""
"Открити са пакети, които не са необходими за конфигурирането на вашата "
"система."
-#: pkgs.pm:270
+#: pkgs.pm:272
#, fuzzy, c-format
msgid "We will remove the following packages, unless you choose otherwise:"
msgstr "Ще бъдат премахнати следните пакети, освен ако не изберете друго:"
-#: pkgs.pm:273 pkgs.pm:274
+#: pkgs.pm:275 pkgs.pm:276
#, c-format
msgid "Unused hardware support"
msgstr "Неизползвана поддръжка на хардуерни устройства"
-#: pkgs.pm:277 pkgs.pm:278
+#: pkgs.pm:279 pkgs.pm:280
#, c-format
msgid "Unused localization"
msgstr "Неизползвани локализации"
@@ -6611,7 +6621,7 @@ msgstr "Старт"
msgid "Stop"
msgstr "Стоп"
-#: standalone.pm:25
+#: standalone.pm:26
#, c-format
msgid ""
"This program is free software; you can redistribute it and/or modify\n"
@@ -6630,7 +6640,7 @@ msgid ""
"USA.\n"
msgstr ""
-#: standalone.pm:44
+#: standalone.pm:45
#, c-format
msgid ""
"[--config-info] [--daemon] [--debug] [--default] [--show-conf]\n"
@@ -6646,7 +6656,7 @@ msgid ""
"--version : show version number.\n"
msgstr ""
-#: standalone.pm:56
+#: standalone.pm:57
#, c-format
msgid ""
"[--boot]\n"
@@ -6655,7 +6665,7 @@ msgid ""
"default mode: offer to configure autologin feature"
msgstr ""
-#: standalone.pm:60
+#: standalone.pm:61
#, c-format
msgid ""
"[OPTIONS] [PROGRAM_NAME]\n"
@@ -6666,7 +6676,7 @@ msgid ""
" --incident - program should be one of %s tools"
msgstr ""
-#: standalone.pm:66
+#: standalone.pm:67
#, c-format
msgid ""
"[--add]\n"
@@ -6677,7 +6687,7 @@ msgid ""
" --wizard - like --add"
msgstr ""
-#: standalone.pm:72
+#: standalone.pm:73
#, c-format
msgid ""
"\n"
@@ -6695,7 +6705,7 @@ msgid ""
" : and gs for ghostscript for only this one."
msgstr ""
-#: standalone.pm:87
+#: standalone.pm:88
#, c-format
msgid ""
"[OPTIONS]...\n"
@@ -6713,17 +6723,17 @@ msgid ""
"IP, nbi image name)"
msgstr ""
-#: standalone.pm:99
+#: standalone.pm:100
#, c-format
msgid "[keyboard]"
msgstr "[клавиатура]"
-#: standalone.pm:100
+#: standalone.pm:101
#, c-format
msgid "[--file=myfile] [--word=myword] [--explain=regexp] [--alert]"
msgstr ""
-#: standalone.pm:101
+#: standalone.pm:102
#, c-format
msgid ""
"[OPTIONS]\n"
@@ -6737,7 +6747,7 @@ msgid ""
"--quiet : do not be interactive. To be used with (dis)connect."
msgstr ""
-#: standalone.pm:111
+#: standalone.pm:112
#, c-format
msgid ""
"[OPTION]...\n"
@@ -6749,14 +6759,14 @@ msgid ""
" --merge-all-rpmnew propose to merge all .rpmnew/.rpmsave files found"
msgstr ""
-#: standalone.pm:116
+#: standalone.pm:117
#, c-format
msgid ""
"[--manual] [--device=dev] [--update-sane=sane_source_dir] [--update-"
"usbtable] [--dynamic=dev]"
msgstr ""
-#: standalone.pm:117
+#: standalone.pm:118
#, c-format
msgid ""
" [everything]\n"
@@ -6764,7 +6774,7 @@ msgid ""
" XFdrake resolution"
msgstr ""
-#: standalone.pm:153
+#: standalone.pm:154
#, c-format
msgid ""
"\n"
################################################## #- In/Out Steps Functions #-###################################################################################### sub enteringStep { my ($o, $step) = @_; log::l("starting step `$step'"); } sub leavingStep { my ($o, $step) = @_; log::l("step `$step' finished"); if (-d "$o->{prefix}/root/drakx") { eval { cp_af("/tmp/ddebug.log", "$o->{prefix}/root/drakx") }; output(install_any::auto_inst_file(), install_any::g_auto_install(1)); } for (my $s = $o->{steps}{first}; $s; $s = $o->{steps}{$s}{next}) { #- the reachability property must be recomputed each time to take #- into account failed step. next if $o->{steps}{$s}{done} && !$o->{steps}{$s}{redoable}; my $reachable = 1; if (my $needs = $o->{steps}{$s}{needs}) { my @l = ref $needs ? @$needs : $needs; $reachable = min(map { $o->{steps}{$_}{done} || 0 } @l); } $o->{steps}{$s}{reachable} = 1 if $reachable; } $o->{steps}{$step}{reachable} = $o->{steps}{$step}{redoable}; while (my $f = shift @{$o->{steps}{$step}{toBeDone} || []}) { eval { &$f() }; $o->ask_warn(N("Error"), [ N("An error occurred, but I don't know how to handle it nicely. Continue at your own risk."), $@ ]) if $@; } } sub errorInStep($$) { print "error :(\n"; c::_exit(1) } sub kill_action {} sub set_help { 1 } #-###################################################################################### #- Steps Functions #-###################################################################################### #------------------------------------------------------------------------------ sub selectLanguage { my ($o) = @_; lang::set($o->{lang}, !$o->isa('interactive::gtk')); $o->{langs} ||= { $o->{lang} => 1 }; log::l("selectLanguage: pack_langs ", lang::pack_langs($o->{langs})); #- for auto_install compatibility with old $o->{keyboard} containing directly $o->{keyboard}{KEYBOARD} $o->{keyboard} = { KEYBOARD => $o->{keyboard} } if $o->{keyboard} && !ref($o->{keyboard}); if (!$o->{keyboard} || $o->{keyboard}{unsafe}) { $o->{keyboard} = keyboard::from_usb() || keyboard::lang2keyboard($o->{lang}); $o->{keyboard}{unsafe} = 1; keyboard::setup($o->{keyboard}) if !$::live; } addToBeDone { lang::write_langs($o->{prefix}, $o->{langs}); } 'formatPartitions' unless $::g_auto_install; addToBeDone { lang::write($o->{prefix}, $o->{lang}); } 'installPackages' unless $::g_auto_install; } #------------------------------------------------------------------------------ sub selectKeyboard { my ($o) = @_; $o->{keyboard}{KBCHARSET} = lang::lang2charset($o->{lang}); keyboard::setup($o->{keyboard}); addToBeDone { keyboard::write($o->{keyboard}); } 'installPackages' if !$::g_auto_install && (!$o->{isUpgrade} || !$o->{keyboard}{unsafe}); } #------------------------------------------------------------------------------ sub acceptLicence {} sub selectPath {} #------------------------------------------------------------------------------ sub selectInstallClass {} #------------------------------------------------------------------------------ sub setupSCSI { my ($o) = @_; modules::configure_pcmcia($o->{pcmcia}) if $o->{pcmcia}; modules::load_ide(); modules::load_category('bus/firewire'); modules::load_category('disk/scsi|hardware_raid'); } #------------------------------------------------------------------------------ sub doPartitionDisksBefore { my ($o) = @_; eval { close *pkgs::LOG; eval { fs::umount("$o->{prefix}/proc") }; eval { fs::umount_all($o->{fstab}, $o->{prefix}) }; eval { sleep 1; fs::umount_all($o->{fstab}, $o->{prefix}) } if $@; #- HACK } if $o->{fstab} && !$::testing && !$::live; } #------------------------------------------------------------------------------ sub doPartitionDisksAfter { my ($o) = @_; if (!$::testing) { my $hds = $o->{all_hds}{hds}; partition_table::write($_) foreach @$hds; $_->{rebootNeeded} and $o->rebootNeeded foreach @$hds; } fs::set_removable_mntpoints($o->{all_hds}); fs::set_all_default_options($o->{all_hds}, $o->{useSupermount}, $o->{security}, lang::fs_options($o->{lang})) if !$o->{isUpgrade}; $o->{fstab} = [ fsedit::get_all_fstab($o->{all_hds}) ]; fsedit::get_root_($o->{fstab}) or die "Oops, no root partition"; if (arch() =~ /ppc/ && detect_devices::get_mac_generation() =~ /NewWorld/) { die "Need bootstrap partition to boot system!" if !(defined $partition_table::mac::bootstrap_part); } if (arch() =~ /ia64/ && !fsedit::has_mntpoint("/boot/efi", $o->{all_hds})) { die N("You must have a FAT partition mounted in /boot/efi"); } if ($o->{partitioning}{use_existing_root}) { #- ensure those partitions are mounted so that they are not proposed in choosePartitionsToFormat fs::mount_part($_, $o->{prefix}) foreach (sort { $a->{mntpoint} cmp $b->{mntpoint} } grep { $_->{mntpoint} && maybeFormatted($_) } @{$o->{fstab}}); } cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/image nfs| && !grep { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{all_hds}{nfss}} and push @{$o->{all_hds}{nfss}}, { type => 'nfs', mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,soft,rsize=8192,wsize=8192" }; } #------------------------------------------------------------------------------ sub doPartitionDisks { my ($o) = @_; install_any::getHds($o); if ($o->{partitioning}{use_existing_root} || $o->{isUpgrade}) { # either one root is defined (and all is ok), or we take the first one we find my $p = fsedit::get_root_($o->{fstab}) || first(install_any::find_root_parts($o->{fstab}, $o->{prefix})) or die; install_any::use_root_part($o->{all_hds}, $p, $o->{prefix}); } if ($o->{partitioning}{auto_allocate}) { fsedit::auto_allocate($o->{all_hds}, $o->{partitions}); } } #------------------------------------------------------------------------------ sub ask_mntpoint_s { my ($o, $fstab) = @_; #- TODO: set the mntpoints my %m; foreach (@$fstab) { my $m = $_->{mntpoint}; next unless $m && $m ne 'swap'; #- there may be a lot of swap. $m{$m} and die N("Duplicate mount point %s", $m); $m{$m} = 1; #- in case the type does not correspond, force it to ext3 $_->{type} = 0x483 if $m =~ m|^/| && !isTrueFS($_) && !isOtherAvailableFS($_); } 1; } sub rebootNeeded($) { my ($o) = @_; log::l("Rebooting..."); c::_exit(0); } sub choosePartitionsToFormat($$) { my ($o, $fstab) = @_; foreach (@$fstab) { $_->{mntpoint} = "swap" if isSwap($_); $_->{mntpoint} or next; add2hash_($_, { toFormat => $_->{notFormatted} }); $_->{toFormatUnsure} = member($_->{mntpoint}, '/', '/usr'); if (!$_->{toFormat}) { my $t = fsedit::typeOfPart($_->{device}); $_->{toFormatUnsure} ||= #- if detected dos/win, it's not precise enough to just compare the types (too many of them) (!$t || isOtherAvailableFS({ type => $t }) ? !isOtherAvailableFS($_) : $t != $_->{type}); } } } sub formatMountPartitions { my ($o) = @_; fs::formatMount_all($o->{all_hds}{raids}, $o->{fstab}, $o->{prefix}); } #------------------------------------------------------------------------------ sub setPackages { my ($o, $rebuild_needed) = @_; install_any::setPackages($o, $rebuild_needed); pkgs::selectPackagesAlreadyInstalled($o->{packages}, $o->{prefix}); $rebuild_needed and pkgs::selectPackagesToUpgrade($o->{packages}, $o->{prefix}); } sub choosePackages { my ($o, $packages, $compssUsers, $first_time) = @_; #- now for upgrade, package that must be upgraded are #- selected first, after is used the same scheme as install. #- make sure we kept some space left for available else the system may #- not be able to start (xfs at least). my $available = install_any::getAvailableSpace($o); my $availableCorrected = pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024); log::l(sprintf "available size %s (corrected %s)", formatXiB($available), formatXiB($availableCorrected)); add2hash_($o, { compssListLevel => 5 }) if !$::auto_install; #- avoid destroying user selection of packages but only #- for expert, as they may have done individual selection before. if ($first_time || !$::expert) { exists $o->{compssListLevel} and pkgs::setSelectedFromCompssList($packages, $o->{compssUsersChoice}, $o->{compssListLevel}, $availableCorrected); } $availableCorrected; } sub beforeInstallPackages { my ($o) = @_; #- save these files in case of upgrade failure. if ($o->{isUpgrade}) { foreach (@filesToSaveForUpgrade) { unlink "$o->{prefix}/$_.mdkgisave"; if (-e "$o->{prefix}/$_") { eval { cp_af("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgisave") }; } } foreach (@filesNewerToUseAfterUpgrade) { unlink "$o->{prefix}/$_.rpmnew"; } } #- some packages need such files for proper installation. install_any::write_fstab($o); require network; network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1"); log::l("setting excludedocs to $o->{excludedocs}"); substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$o->{prefix}/etc/rpm/macros"; #- add oem lilo theme and background if the files exists. mkdir "$o->{prefix}$_" foreach qw(/boot /usr /usr/share /usr/share/mdk); install_any::getAndSaveFile("Mandrake/base/oem-message-graphic", "$o->{prefix}/boot/oem-message-graphic"); install_any::getAndSaveFile("Mandrake/base/oem-background.png", "$o->{prefix}/usr/share/mdk/oem-background.png"); } sub pkg_install { my ($o, @l) = @_; log::l("selecting packages"); require pkgs; if ($::testing) { log::l("selecting package \"$_\"") foreach @l; } else { $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}); pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || die "$_ rpm not found") foreach @l; } my @toInstall = pkgs::packagesToInstall($o->{packages}); if (@toInstall) { log::l("installing packages"); $o->installPackages; } else { log::l("all packages selected are already installed, nothing to do") } } sub pkg_install_if_requires_satisfied { my ($o, @l) = @_; require pkgs; $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}); foreach (@l) { my %newSelection; my $pkg = pkgs::packageByName($o->{packages}, $_) || die "$_ rpm not found"; pkgs::selectPackage($o->{packages}, $pkg, 0, \%newSelection); if (scalar(keys %newSelection) == 1) { pkgs::selectPackage($o->{packages}, $pkg); } else { log::l("pkg_install_if_requires_satisfied: not selecting $_ because of ", join(", ", keys %newSelection)); } } $o->installPackages; } sub installPackages($$) { #- complete REWORK, TODO and TOCHECK! my ($o) = @_; my $packages = $o->{packages}; #- this method is always called, go here to close still opened rpm db. delete $packages->{rpmdb}; if (%{$packages->{state}{ask_remove} || {}}) { log::l("removing : ", join ', ', keys %{$packages->{state}{ask_remove}}); pkgs::remove($o->{prefix}, [ keys %{$packages->{state}{ask_remove}} ], $packages); } #- small transaction will be built based on this selection and depslist. my @toInstall = pkgs::packagesToInstall($packages); my $time = time; $ENV{DURING_INSTALL} = 1; pkgs::install($o->{prefix}, $o->{isUpgrade}, \@toInstall, $packages); delete $ENV{DURING_INSTALL}; run_program::rooted_or_die($o->{prefix}, 'ldconfig') unless $::g_auto_install; log::l("Install took: ", formatTimeRaw(time - $time)); install_any::log_sizes($o); scalar(@toInstall); #- return number of packages installed. } sub afterInstallPackages($) { my ($o) = @_; return if $::g_auto_install; die N("Some important packages didn't get installed properly. Either your cdrom drive or your cdrom is defective. Check the cdrom on an installed computer using \"rpm -qpl Mandrake/RPMS/*.rpm\" ") if grep { m|read failed: Input/output error| } cat_("$o->{prefix}/root/drakx/install.log"); if (arch() !~ /^sparc/) { #- TODO restore it as may be needed for sparc -x "$o->{prefix}/usr/bin/dumpkeys" or $::testing or die "Some important packages didn't get installed properly. Please switch to console 2 (using ctrl-alt-f2) and look at the log file /tmp/ddebug.log Consoles 1,3,4,7 may also contain interesting information"; } #- why not? cuz weather is nice today :-) [pixel] common::sync(); common::sync(); my $have_devfsd = do { my $p = pkgs::packageByName($o->{packages}, 'devfsd'); $p && $p->flag_installed }; if ($have_devfsd) { require bootloader; bootloader::may_append($o->{bootloader}, devfs => 'mount'); } #- generate /etc/lvmtab needed for rc.sysinit run_program::rooted($o->{prefix}, 'vgscan') if -e '/etc/lvmtab'; #- configure PCMCIA services if needed. modules::write_pcmcia($o->{prefix}, $o->{pcmcia}); #- for mandrake_firstime touch "$o->{prefix}/var/lock/TMP_1ST"; any::config_dvd($o->{prefix}, $have_devfsd); any::config_mtools($o->{prefix}); any::writeandclean_ldsoconf($o->{prefix}); #- make sure wins is disabled in /etc/nsswitch.conf #- else if eth0 is not existing, glibc segfaults. substInFile { s/\s*wins// if /^\s*hosts\s*:/ } "$o->{prefix}/etc/nsswitch.conf"; #- make sure some services have been enabled (or a catastrophic restart will occur). #- these are normally base package post install scripts or important services to start. run_program::rooted($o->{prefix}, "chkconfig", "--add", $_) foreach qw(random netfs network rawdevices sound kheader usb keytable syslog crond portmap); if ($o->{mouse}{device} =~ /ttyS/) { log::l("disabling gpm for serial mice (doesn't get along nicely with X)"); run_program::rooted($o->{prefix}, "chkconfig", "--del", "gpm") } #- call update-menus at the end of package installation run_program::rooted($o->{prefix}, "update-menus"); if ($o->{pcmcia}) { substInFile { s/.*(TaskBarShowAPMStatus).*/$1=1/ } "$o->{prefix}/usr/lib/X11/icewm/preferences"; eval { cp_af("$o->{prefix}/usr/share/applnk/System/kapm.kdelnk", "$o->{prefix}/etc/skel/Desktop/Autostart/kapm.kdelnk") }; } $o->install_urpmi; if ($o->{lang} =~ /^(zh_TW|th|vi|be|bg)/) { #- skip since we don't have the right font (it badly fails at least for zh_TW) } elsif (my $LANG = lang::lang2LANG($o->{lang})) { my $kdmrc = "$o->{prefix}/usr/share/config/kdm/kdmrc"; my $kde_charset = lang::charset2kde_charset(lang::lang2charset($o->{lang})); my $welcome = c::to_utf8(N("Welcome to %s", '%n')); substInFile { s/^(GreetString)=.*/$1=$welcome/; s/^(Language)=.*/$1=$LANG/; if (!member($kde_charset, 'iso8859-1', 'iso8859-15')) { #- don't keep the default for those s/^(StdFont)=.*/$1=*,12,5,$kde_charset,50,0/; s/^(FailFont)=.*/$1=*,12,5,$kde_charset,75,0/; s/^(GreetFont)=.*/$1=*,24,5,$kde_charset,50,0/; } } "$o->{prefix}/usr/share/config/kdm/kdmrc"; } install_any::disable_user_view($o->{prefix}) if $o->{security} >= 3 || $o->{authentication}{NIS}; run_program::rooted($o->{prefix}, "kdeDesktopCleanup"); foreach (list_skels($o->{prefix}, '.kde/share/config/kfmrc')) { my $found; substInFile { $found ||= /KFM Misc Defaults/; $_ .= "[KFM Misc Defaults] GridWidth=85 GridHeight=70 " if eof && !$found; } $_ } #- move some file after an upgrade that may be seriously annoying. #- and rename saved files to .mdkgiorig. if ($o->{isUpgrade}) { my $pkg = pkgs::packageByName($o->{packages}, 'rpm'); $pkg && ($pkg->flag_selected || $pkg->flag_installed) && $pkg->compare(">= 4.0") and pkgs::cleanOldRpmDb($o->{prefix}); log::l("moving previous desktop files that have been updated to Trash of each user"); install_any::kdemove_desktop_file($o->{prefix}); foreach (@filesToSaveForUpgrade) { renamef("$o->{prefix}/$_.mdkgisave", "$o->{prefix}/$_.mdkgiorig") if -e "$o->{prefix}$_.mdkgisave"; } foreach (@filesNewerToUseAfterUpgrade) { if (-e "$o->{prefix}/$_.rpmnew" && -e "$o->{prefix}/$_") { renamef("$o->{prefix}/$_", "$o->{prefix}/$_.mdkgiorig"); renamef("$o->{prefix}/$_.rpmnew", "$o->{prefix}/$_"); } } } #- fix bad update-alternatives that may occurs after upgrade (but let them for install too). if (-d "$o->{prefix}/etc/alternatives") { local (*ALTERNATE_DIR, $_); opendir ALTERNATE_DIR, "$o->{prefix}/etc/alternatives"; while (defined($_ = readdir ALTERNATE_DIR)) { -e "$o->{prefix}/etc/alternatives/$_" and next; log::l("fixing broken alternative $_"); run_program::rooted($o->{prefix}, "update-alternatives", "--auto", $_); } closedir ALTERNATE_DIR; } #- update oem lilo image if it exists. if (-s "$o->{prefix}/boot/oem-message-graphic") { rename "$o->{prefix}/boot/message-graphic", "$o->{prefix}/boot/message-graphic.mdkgiorig"; rename "$o->{prefix}/boot/oem-message-graphic", "$o->{prefix}/boot/message-graphic"; } #- update background image if it exists for common environment. if (-s "$o->{prefix}/usr/share/mdk/oem-background.png") { if (-e "$o->{prefix}/usr/share/mdk/backgrounds/default.png") { rename "$o->{prefix}/usr/share/mdk/backgrounds/default.png", "$o->{prefix}/usr/share/mdk/backgrounds/default.png.mdkgiorig"; rename "$o->{prefix}/usr/share/mdk/oem-background.png", "$o->{prefix}/usr/share/mdk/backgrounds/default.png"; } else { #- KDE desktop background. if (-e "$o->{prefix}/usr/share/config/kdesktoprc") { update_gnomekderc("$o->{prefix}/usr/share/config/kdesktoprc", "Desktop0", MultiWallpaperMode => "NoMulti", Wallpaper => "/usr/share/mdk/oem-background.png", WallpaperMode => "Scaled", ); } #- GNOME desktop background. if (-e "$o->{prefix}/etc/gnome/config/Background") { update_gnomekderc("$o->{prefix}/etc/gnome/config/Background", "Default", wallpaper => "/usr/share/mdk/oem-background.png", wallpaperAlign => "3", ); } } } if ($o->{blank} || $o->{updatemodules}) { my @l = detect_devices::floppies_dev(); foreach (qw(blank updatemodules)) { $o->{$_} eq "1" and $o->{$_} = $l[0] || die N("No floppy drive available"); } $o->{blank} and $o->copyKernelFromFloppy(); $o->{updatemodules} and $o->updateModulesFromFloppy(); } } sub copyKernelFromFloppy { my ($o) = @_; return if $::testing || !$o->{blank}; fs::mount($o->{blank}, "/floppy", "vfat", 0); eval { cp_af("/floppy/vmlinuz", "$o->{prefix}/boot/vmlinuz-default") }; if ($@) { log::l("copying of /floppy/vmlinuz from blank modified disk failed: $@"); } fs::umount("/floppy"); } sub install_urpmi { my ($o) = @_; my $pkg = pkgs::packageByName($o->{packages}, 'urpmi'); if ($pkg && ($pkg->flag_selected || $pkg->flag_installed)) { install_any::install_urpmi($o->{prefix}, $::oem ? 'cdrom' : $o->{method}, #- HACK $o->{packages}, $o->{packages}{mediums}); pkgs::saveCompssUsers($o->{prefix}, $o->{packages}, $o->{compssUsers}, $o->{compssUsersSorted}); } } sub updateModulesFromFloppy { my ($o) = @_; return if $::testing || !$o->{updatemodules}; fs::mount($o->{updatemodules}, "/floppy", "ext2", 0); foreach (glob_("$o->{prefix}/lib/modules/*")) { my ($kernelVersion) = m,lib/modules/(\S*),; log::l("examining updated modules for kernel $kernelVersion"); if (-d "/floppy/$kernelVersion") { my @src_files = glob_("/floppy/$kernelVersion/*"); my @dest_files = map { chomp_($_) } run_program::rooted_get_stdout($o->{prefix}, 'find', '/lib/modules'); foreach my $s (@src_files) { log::l("found updatable module $s"); my ($sfile, $sext) = $s =~ /([^\/\.]*\.o)(?:\.gz|\.bz2)?$/; my $qsfile = quotemeta $sfile; my $qsext = quotemeta $sext; foreach my $target (@dest_files) { $target =~ /$qsfile/ or next; eval { cp_af($s, $target) }; if ($@) { log::l("updating module $target by $s failed: $@"); } else { log::l("updating module $target by $s"); } if ($target !~ /$qsfile$qsext$/) { #- extension differ, first rename target file correctly, #- then uncompress source file, then compress it as expected. my ($basetarget, $text) = $target =~ /(.*?)(\.gz|\.bz2)$/; rename $target, "$basetarget$sext"; $sext eq '.gz' and run_program::run("gzip", "-d", "$basetarget$sext"); $sext eq '.bz2' and run_program::run("bzip2", "-d", "$basetarget$sext"); $text eq '.gz' and run_program::run("gzip", $basetarget); $text eq '.bz2' and run_program::run("bzip2", $basetarget); } } } } } fs::umount("/floppy"); } #------------------------------------------------------------------------------ sub selectMouse($) { my ($o) = @_; } #------------------------------------------------------------------------------ sub configureNetwork { my ($o) = @_; require network; network::configureNetwork2($o, $o->{prefix}, $o->{netc}, $o->{intf}); if ($o->{method} =~ /ftp|http|nfs/) { $o->{netcnx}{type} = 'lan'; foreach ("up", "down") { my $f = "$o->{prefix}/etc/sysconfig/network-scripts/net_cnx_$_"; output $f, "\nif$_ eth0\n"; chmod 0755, $f; } output "$o->{prefix}/etc/sysconfig/network-scripts/net_cnx_pg", "\n/usr/sbin/drakconnet\n"; } } #------------------------------------------------------------------------------ sub installCrypto { my ($o) = @_; my $u = $o->{crypto} or return; $u->{mirror} && $u->{packages} or return; upNetwork($o); require crypto; my @crypto_packages = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); $o->pkg_install(@{$u->{packages}}); } sub installUpdates { my ($o) = @_; my $u = $o->{updates} or return; $u->{updates} or return; upNetwork($o); require crypto; crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}) and $o->pkg_install(@{$u->{packages} || []}); #- re-install urpmi with update security medium. $o->install_urpmi; } sub summary { my ($o) = @_; configureTimezone($o); configurePrinter($o) if $o->{printer}; } #------------------------------------------------------------------------------ sub configureTimezone { my ($o) = @_; install_any::preConfigureTimezone($o); $o->pkg_install('ntp') if $o->{timezone}{ntp}; require timezone; timezone::write($o->{prefix}, $o->{timezone}); } #------------------------------------------------------------------------------ sub configureServices { my ($o) = @_; if ($o->{services}) { require services; services::doit($o, $o->{services}, $o->{prefix}); } } #------------------------------------------------------------------------------ sub configurePrinter { my($o) = @_; $o->do_pkgs->install('foomatic', 'printer-utils','printer-testpages', if_($o->do_pkgs->is_installed('gimp'), 'gimpprint')); require printer; eval { add2hash($o->{printer} ||= {}, printer::getinfo($o->{prefix})) }; #- get existing configuration. require printerdrake; printerdrake::install_spooler($o->{printer}, $o); #- not interactive... foreach (values %{$o->{printer}{configured} || {}}) { log::l("configuring printer queue " . $_->{queuedata}{queue} || $_->{QUEUE}); #- when copy is so adule (sorry french taste :-) #- and when there are some configuration in one place and in another place... $o->{printer}{currentqueue} = {}; printer::copy_printer_params($_->{queuedata}, $o->{printer}{currentqueue}); printer::copy_printer_params($_, $o->{printer}); #- setup all configured queues, which is not the case interactively where #- only the working queue is setup on configuration. printer::configure_queue($o->{printer}); } } #------------------------------------------------------------------------------ sub setRootPassword { my ($o) = @_; my $p = $o->{prefix}; my $u = $o->{superuser} ||= {}; $o->{superuser}{name} = 'root'; any::write_passwd_user($o->{prefix}, $o->{superuser}, $o->{authentication}{md5}); delete $o->{superuser}{name}; } #------------------------------------------------------------------------------ sub addUser { my ($o) = @_; my $p = $o->{prefix}; my $users = $o->{users} ||= []; my (%uids, %gids); foreach (glob_("$p/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1 } foreach (@$users) { $_->{home} ||= "/home/$_->{name}"; my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]) || int getpwnam($_->{name}); my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]) || int getgrnam($_->{name}); #- search for available uid above 501 else initscripts may fail to change language for KDE. if (!$u || getpwuid($u)) { for ($u = 501; getpwuid($u) || $uids{$u}; $u++) {} } if (!$g) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} } $_->{uid} = $u; $uids{$u} = 1; $_->{gid} = $g; $gids{$g} = 1; } any::write_passwd_user($p, $_, $o->{authentication}{md5}) foreach @$users; local *F; open F, ">> $p/etc/group" or die "can't append to group file: $!"; print F "$_->{name}:x:$_->{gid}:\n" foreach grep { ! getgrgid($_->{gid}) } @$users; foreach my $u (@$users) { if (! -d "$p$u->{home}") { my $mode = $o->{security} < 2 ? 0755 : 0750; eval { cp_af("$p/etc/skel", "$p$u->{home}") }; if ($@) { log::l("copying of skel failed: $@"); mkdir("$p$u->{home}", $mode); } else { chmod $mode, "$p$u->{home}"; } } require commands; eval { commands::chown_("-r", "$u->{uid}.$u->{gid}", "$p$u->{home}") } if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg}; } any::addUsers($p, $users); $o->pkg_install("autologin") if $o->{autologin}; any::set_autologin($p, $o->{autologin}, $o->{desktop}); install_any::setAuthentication($o); install_any::disable_user_view($p) if @$users == (); } #------------------------------------------------------------------------------ sub createBootdisk($) { my ($o) = @_; my $dev = $o->{mkbootdisk} or return; my @l = detect_devices::floppies_dev(); $dev = shift @l || die N("No floppy drive available") if $dev eq "1"; #- special case meaning autochoose return if $::testing; require bootloader; bootloader::mkbootdisk(install_any::kernelVersion($o), $dev, $o->{bootloader}{perImageAppend}); $o->{mkbootdisk} = $dev; } #------------------------------------------------------------------------------ sub readBootloaderConfigBeforeInstall { my ($o) = @_; my ($image, $v); require bootloader; add2hash($o->{bootloader} ||= {}, bootloader::read()); #- since kernel or kernel-smp may not be upgraded, it should be checked #- if there is a need to update existing lilo.conf entries by following #- symlinks before kernel or other packages get installed. #- update everything that could be a filename (for following symlink). foreach my $e (@{$o->{bootloader}{entries}}) { while (my $v = readlink "$o->{prefix}/$e->{kernel_or_dev}") { $v = "/boot/$v" if $v !~ m|^/|; -e "$o->{prefix}$v" or last; log::l("renaming $e->{kernel_or_dev} entry by $v"); $e->{kernel_or_dev} = $v; } while (my $v = readlink "$o->{prefix}/$e->{initrd}") { $v = "/boot/$v" if $v !~ m|^/|; -e "$o->{prefix}$v" or last; log::l("renaming $e->{initrd} entry by $v"); $e->{initrd} = $v; } } } sub setupBootloaderBefore { my ($o) = @_; require bootloader; if (my @l = (grep { $_->{bus} eq 'ide' } detect_devices::burners(), detect_devices::raw_zips())) { bootloader::add_append($o->{bootloader}, $_->{device}, 'ide-scsi') foreach @l; } if ($o->{miscellaneous}{HDPARM}) { bootloader::add_append($o->{bootloader}, $_, 'autotune') foreach grep { /ide.*/ } all("/proc/ide"); } if (cat_("/proc/cmdline") =~ /mem=nopentium/) { bootloader::add_append($o->{bootloader}, 'mem', 'nopentium'); } if (cat_("/proc/cmdline") =~ /\b(pci)=(\S+)/) { bootloader::add_append($o->{bootloader}, $1, $2); } if (arch() =~ /alpha/) { if (my $dev = fsedit::get_root($o->{fstab})) { $o->{bootloader}{boot} ||= "/dev/$dev->{rootDevice}"; $o->{bootloader}{root} ||= "/dev/$dev->{device}"; $o->{bootloader}{part_nb} ||= first($dev->{device} =~ /(\d+)/); } } else { #- check for valid fb mode to enable a default boot with frame buffer. my $vga = $o->{allowFB} && (!detect_devices::matching_desc('3D Rage LT') && !detect_devices::matching_desc('Rage Mobility [PL]') && !detect_devices::matching_desc('i740') && !detect_devices::matching_desc('Matrox') && !detect_devices::matching_desc('Tseng.*ET6\d00') && !detect_devices::matching_desc('SiS.*SG86C2.5') && !detect_devices::matching_desc('SiS.*559[78]') && !detect_devices::matching_desc('SiS.*300') && !detect_devices::matching_desc('SiS.*540') && !detect_devices::matching_desc('SiS.*6C?326') && !detect_devices::matching_desc('SiS.*6C?236') && !detect_devices::matching_desc('Voodoo [35]|Voodoo Banshee') && #- 3d acceleration seems to bug in fb mode !detect_devices::matching_desc('8281[05].* CGC') #- i810 now have FB support during install but we disable it afterwards );