# translation of zh_TW.po to 正體中文 # translation of zh_TW.po to Chinese Traditional # translation of DrakX-zh_TW.po to Chinese Traditional # drakbootdisk messages in Traditional Chinese # Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. # Platin , 2000 # Kenduest Lee , 2002 # Danny Zeng , 2000. # Joe Man , 2001. # Chong Sein Yeo , 2003. # Hilbert , 2003, 2004. # Hilbert , 2004. # hilbert , 2004. # Shiva Huang , 2005. # Shiva Huang , 2005, 2006, 2008 # You-Cheng Hsieh , 2005, 2006. # msgid "" msgstr "" "Project-Id-Version: DrakX\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-03-21 20:52+0100\n" "PO-Revision-Date: 2008-02-22 02:26+0800\n" "Last-Translator: Shiva Huang \n" "Language-Team: Traditional Chinese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.3.1\n" "X-Poedit-Language: Chinese\n" "X-Poedit-Country: TAIWAN\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../advertising/IM_flash.pl:1 #, c-format msgid "Your desktop on a USB key" msgstr "" #: ../../advertising/IM_free08S.pl:1 #, c-format msgid "The 100%% open source Mandriva Linux distribution" msgstr "" #: ../../advertising/IM_one08S.pl:1 #, c-format msgid "Explore Linux easily with Mandriva One" msgstr "" #: ../../advertising/IM_pwp08S.pl:1 #, c-format msgid "A full Mandriva Linux desktop, with support" msgstr "" #: ../../advertising/IM_range08S.pl:1 #, c-format msgid "Mandriva: distributions for everybody's needs" msgstr "" #: any.pm:109 #, c-format msgid "Do you have further supplementary media?" msgstr "您還有其他的補充媒介嗎?" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: any.pm:158 #, c-format msgid "" "The following media have been found and will be used during install: %s.\n" "\n" "\n" "Do you have a supplementary installation medium to configure?" msgstr "" "已經找到下列媒介,它們將會在安裝過程中使用到:%s。\n" "\n" "\n" "您有其他的安裝媒介需要設定嗎?" #: any.pm:166 #, c-format msgid "CD-ROM" msgstr "CD-ROM" #: any.pm:167 #, c-format msgid "Network (HTTP)" msgstr "網路 (HTTP)" #: any.pm:168 #, c-format msgid "Network (FTP)" msgstr "網路 (FTP)" #: any.pm:169 #, c-format msgid "Network (NFS)" msgstr "網路 (NFS)" #: any.pm:211 #, c-format msgid "URL of the mirror?" msgstr "映像站的 URL?" #: any.pm:217 #, c-format msgid "URL must start with ftp:// or http://" msgstr "URL 開頭必須是 ftp:// 或 http://" #: any.pm:228 #, c-format msgid "" "Contacting Mandriva Linux web site to get the list of available mirrors..." msgstr "正在連結到 Mandriva Linux 網站查詢可用的映射站台..." #: any.pm:233 #, c-format msgid "" "Failed contacting Mandriva Linux web site to get the list of available " "mirrors" msgstr "無法連結到 Mandriva Linux 網站取得可用的映射站台" #: any.pm:243 #, c-format msgid "Choose a mirror from which to get the packages" msgstr "選取要用來抓取程式套件檔的 FTP 映射站台" #: any.pm:273 #, c-format msgid "NFS setup" msgstr "設定 NFS" #: any.pm:274 #, c-format msgid "Please enter the hostname and directory of your NFS media" msgstr "請輸入您的 NFS 媒介的主機和目錄名稱" #: any.pm:278 #, c-format msgid "Hostname missing" msgstr "沒有主機名稱" #: any.pm:279 #, c-format msgid "Directory must begin with \"/\"" msgstr "目錄必須以「/」開始" #: any.pm:283 #, c-format msgid "Hostname of the NFS mount ?" msgstr "NFS 掛載點的主機名稱?" #: any.pm:284 #, c-format msgid "Directory" msgstr "目錄" #: any.pm:306 #, c-format msgid "Supplementary" msgstr "補充" #: any.pm:341 #, c-format msgid "" "Can't find a package list file on this mirror. Make sure the location is " "correct." msgstr "無法在這個映像站上找到套件列表檔。請確定位址是正確的。" #: any.pm:375 #, c-format msgid "Looking at packages already installed..." msgstr "正在查看已經安裝過的套件..." #: any.pm:382 #, c-format msgid "Removing packages prior to upgrade..." msgstr "移除套件以更新..." #: any.pm:424 #, c-format msgid "Finding packages to upgrade..." msgstr "正在搜尋要升級的套件..." #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: any.pm:620 #, c-format msgid "" "You have selected the following server(s): %s\n" "\n" "\n" "These servers are activated by default. They do not have any known security\n" "issues, but some new ones could be found. In that case, you must make sure\n" "to upgrade as soon as possible.\n" "\n" "\n" "Do you really want to install these servers?\n" msgstr "" "您已經選擇了下面的伺服器:%s\n" "\n" "\n" "這些伺服器安裝好後預設是啟用的。他們沒有任何已知的安全性問題,\n" "但是某些新的安全性問題或許會被發現。在這種情況下,請您一定要儘快更新。\n" "\n" "\n" "您確定真的要安裝這些伺服器嗎?\n" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: any.pm:643 #, c-format msgid "" "The following packages will be removed to allow upgrading your system: %s\n" "\n" "\n" "Do you really want to remove these packages?\n" msgstr "" "下列套件將被移除以升級您的系統:%s\n" "\n" "\n" "您確定要移除這些套件嗎?\n" #: any.pm:857 #, c-format msgid "Error reading file %s" msgstr "讀取檔案 %s 時發生錯誤" #: any.pm:1065 #, c-format msgid "The following disk(s) were renamed:" msgstr "下列磁碟已經改名:" #: any.pm:1067 #, c-format msgid "%s (previously named as %s)" msgstr "%s (原本為 %s)" #: any.pm:1124 #, c-format msgid "HTTP" msgstr "HTTP" #: any.pm:1124 #, c-format msgid "FTP" msgstr "FTP" #: any.pm:1124 #, c-format msgid "NFS" msgstr "NFS" #: any.pm:1143 steps_interactive.pm:923 #, c-format msgid "Network" msgstr "網路" #: any.pm:1147 #, c-format msgid "Please choose a media" msgstr "請選擇一個媒介" #: any.pm:1163 #, c-format msgid "File already exists. Overwrite it?" msgstr "檔案已經存在了。要覆蓋它嗎?" #: any.pm:1167 #, c-format msgid "Permission denied" msgstr "權限不足" #: any.pm:1215 #, c-format msgid "Bad NFS name" msgstr "錯誤的 NFS 名稱" #: any.pm:1236 #, c-format msgid "Bad media %s" msgstr "損壞的媒介 %s" #: any.pm:1279 #, c-format msgid "Can not make screenshots before partitioning" msgstr "在尚未進行分割前無法提供畫面捕捉功能" #: any.pm:1287 #, c-format msgid "Screenshots will be available after install in %s" msgstr "在安裝後您可以於 %s 取得螢幕截圖" #: gtk.pm:119 #, c-format msgid "Installation" msgstr "安裝" #: gtk.pm:122 share/meta-task/compssUsers.pl:42 #, c-format msgid "Configuration" msgstr "組態設定" #: install2.pm:166 #, c-format msgid "You must also format %s" msgstr "您也必須要格式化 %s" #: interactive.pm:16 #, c-format msgid "" "Some hardware on your computer needs ``proprietary'' drivers to work.\n" "You can find some information about them at: %s" msgstr "" "某些在您電腦上的硬體需要 \"專有版權\" 的驅動程式以便於能夠工作。\n" "您可以在這裡找到一些相關的資訊: %s" #: interactive.pm:22 #, c-format msgid "Bringing up the network" msgstr "啟動網路" #: interactive.pm:27 #, c-format msgid "Bringing down the network" msgstr "關閉網路" #: media.pm:703 media.pm:714 #, c-format msgid "Downloading file %s..." msgstr "正在下載檔案 %s..." #: media.pm:806 #, c-format msgid "Copying some packages on disks for future use" msgstr "正在複製一些程式套件到磁碟以供稍後使用" #: media.pm:859 #, c-format msgid "Copying in progress" msgstr "複製進行中" #: pkgs.pm:28 #, c-format msgid "must have" msgstr "必備的" #: pkgs.pm:29 #, c-format msgid "important" msgstr "重要的" #: pkgs.pm:30 #, c-format msgid "very nice" msgstr "極好的" #: pkgs.pm:31 #, c-format msgid "nice" msgstr "好的" #: pkgs.pm:32 #, c-format msgid "maybe" msgstr "或許" #: pkgs.pm:254 #, c-format msgid "" "Some packages requested by %s cannot be installed:\n" "%s" msgstr "" "無法安裝 %s 要求的某些套件:\n" "%s" #: share/meta-task/compssUsers.pl:11 #, c-format msgid "Workstation" msgstr "工作站" #: share/meta-task/compssUsers.pl:13 #, c-format msgid "Office Workstation" msgstr "辦公軟體平台" #: share/meta-task/compssUsers.pl:15 #, c-format msgid "" "Office programs: wordprocessors (OpenOffice.org Writer, Kword), spreadsheets " "(OpenOffice.org Calc, Kspread), PDF viewers, etc" msgstr "" "辦公軟體:文書處理軟體 (OpenOffice.org Writer、Kword)、試算表 (OpenOffice." "org Calc、Kspread)、PDF 檢視器等等" #: share/meta-task/compssUsers.pl:16 #, c-format msgid "" "Office programs: wordprocessors (kword, abiword), spreadsheets (kspread, " "gnumeric), pdf viewers, etc" msgstr "" "辦公軟體:文書處理軟體 (kword、abiword)、試算表 (kspread、gnumeric)、PDF 檢視" "器等等" #: share/meta-task/compssUsers.pl:21 #, c-format msgid "Game station" msgstr "遊戲平台" #: share/meta-task/compssUsers.pl:22 #, c-format msgid "Amusement programs: arcade, boards, strategy, etc" msgstr "娛樂的一些程式:紙牌、益智、動作、策略等" #: share/meta-task/compssUsers.pl:25 #, c-format msgid "Multimedia station" msgstr "多媒體平台" #: share/meta-task/compssUsers.pl:26 #, c-format msgid "Sound and video playing/editing programs" msgstr "音效以及影像撥放編輯程式" #: share/meta-task/compssUsers.pl:31 #, c-format msgid "Internet station" msgstr "網際網路平台" #: share/meta-task/compssUsers.pl:32 #, c-format msgid "" "Set of tools to read and send mail and news (mutt, tin..) and to browse the " "Web" msgstr "包含讀信、寄信和閱讀新聞群組 (mutt、tin ..) 以及網路瀏覽的工具" #: share/meta-task/compssUsers.pl:37 #, c-format msgid "Network Computer (client)" msgstr "網路電腦 (客戶端)" #: share/meta-task/compssUsers.pl:38 #, c-format msgid "Clients for different protocols including ssh" msgstr "包含 ssh 等其他不同通訊協定的用戶端程式" #: share/meta-task/compssUsers.pl:43 #, c-format msgid "Tools to ease the configuration of your computer" msgstr "讓您方便設定您系統的工具" #: share/meta-task/compssUsers.pl:47 #, c-format msgid "Console Tools" msgstr "Console 工具" #: share/meta-task/compssUsers.pl:48 #, c-format msgid "Editors, shells, file tools, terminals" msgstr "編輯器、shell、檔案工具、終端機" #: share/meta-task/compssUsers.pl:52 share/meta-task/compssUsers.pl:153 #: share/meta-task/compssUsers.pl:155 #, c-format msgid "Development" msgstr "程式開發" #: share/meta-task/compssUsers.pl:53 share/meta-task/compssUsers.pl:156 #, c-format msgid "C and C++ development libraries, programs and include files" msgstr "C/C++ 發展環境,包含編譯器、程式庫與及一些引入檔" #: share/meta-task/compssUsers.pl:56 share/meta-task/compssUsers.pl:160 #, c-format msgid "Documentation" msgstr "文件檔案" #: share/meta-task/compssUsers.pl:57 share/meta-task/compssUsers.pl:161 #, c-format msgid "Books and Howto's on Linux and Free Software" msgstr "Linux 系統與自由軟體的書籍、HOWTO 文件" #: share/meta-task/compssUsers.pl:61 share/meta-task/compssUsers.pl:164 #, c-format msgid "LSB" msgstr "LSB" #: share/meta-task/compssUsers.pl:62 share/meta-task/compssUsers.pl:165 #, c-format msgid "Linux Standard Base. Third party applications support" msgstr "LSB 的支援,包含第三類協力廠商軟體支援" #: share/meta-task/compssUsers.pl:71 #, c-format msgid "Web Server" msgstr "網頁伺服器 (Web)" #: share/meta-task/compssUsers.pl:72 #, c-format msgid "Apache" msgstr "Apache" #: share/meta-task/compssUsers.pl:75 #, c-format msgid "Groupware" msgstr "群組軟體" #: share/meta-task/compssUsers.pl:76 #, c-format msgid "Kolab Server" msgstr "Kolab 伺服器" #: share/meta-task/compssUsers.pl:79 share/meta-task/compssUsers.pl:120 #, c-format msgid "Firewall/Router" msgstr "防火牆/路由器" #: share/meta-task/compssUsers.pl:80 share/meta-task/compssUsers.pl:121 #, c-format msgid "Internet gateway" msgstr "網際網路閘道器" #: share/meta-task/compssUsers.pl:83 #, c-format msgid "Mail/News" msgstr "郵件/新聞" #: share/meta-task/compssUsers.pl:84 #, c-format msgid "Postfix mail server, Inn news server" msgstr "Postfix 郵件伺服器,Inn 新聞伺服器" #: share/meta-task/compssUsers.pl:87 #, c-format msgid "Directory Server" msgstr "目錄伺服器" #: share/meta-task/compssUsers.pl:91 #, c-format msgid "FTP Server" msgstr "FTP 伺服器" #: share/meta-task/compssUsers.pl:92 #, c-format msgid "ProFTPd" msgstr "ProFTPd" #: share/meta-task/compssUsers.pl:95 #, c-format msgid "DNS/NIS" msgstr "DNS/NIS" #: share/meta-task/compssUsers.pl:96 #, c-format msgid "Domain Name and Network Information Server" msgstr "網域名稱與網路資訊伺服器" #: share/meta-task/compssUsers.pl:99 #, c-format msgid "File and Printer Sharing Server" msgstr "檔案與列印分享伺服器" #: share/meta-task/compssUsers.pl:100 #, c-format msgid "NFS Server, Samba server" msgstr "NFS 伺服器、Samba 伺服器" #: share/meta-task/compssUsers.pl:103 share/meta-task/compssUsers.pl:116 #, c-format msgid "Database" msgstr "資料庫軟體" #: share/meta-task/compssUsers.pl:104 #, c-format msgid "PostgreSQL and MySQL Database Server" msgstr "PostgreSQL 與 MySQL 資料庫伺服器" #: share/meta-task/compssUsers.pl:108 #, c-format msgid "Web/FTP" msgstr "Web/FTP" #: share/meta-task/compssUsers.pl:109 #, c-format msgid "Apache, Pro-ftpd" msgstr "Apache、ProFTPD" #: share/meta-task/compssUsers.pl:112 #, c-format msgid "Mail" msgstr "電子郵件" #: share/meta-task/compssUsers.pl:113 #, c-format msgid "Postfix mail server" msgstr "Postfix 郵件伺服器" #: share/meta-task/compssUsers.pl:117 #, c-format msgid "PostgreSQL or MySQL database server" msgstr "PostgreSQL、MySQL 資料庫" #: share/meta-task/compssUsers.pl:124 #, c-format msgid "Network Computer server" msgstr "網路伺服器" #: share/meta-task/compssUsers.pl:125 #, c-format msgid "NFS server, SMB server, Proxy server, ssh server" msgstr "NFS 伺服器、SMB 伺服器、Proxy 伺服器、SSH 伺服器" #: share/meta-task/compssUsers.pl:131 #, c-format msgid "Graphical Environment" msgstr "圖形環境" #: share/meta-task/compssUsers.pl:133 #, c-format msgid "KDE Workstation" msgstr "KDE 工作站" #: share/meta-task/compssUsers.pl:134 #, c-format msgid "" "The K Desktop Environment, the basic graphical environment with a collection " "of accompanying tools" msgstr "K 桌面環境,包含許多好用的圖型介面工具程式" #: share/meta-task/compssUsers.pl:138 #, c-format msgid "GNOME Workstation" msgstr "GNOME 工作站" #: share/meta-task/compssUsers.pl:139 #, c-format msgid "" "A graphical environment with user-friendly set of applications and desktop " "tools" msgstr "包含友善的應用程式、桌面軟體的圖型化使用環境" #: share/meta-task/compssUsers.pl:142 #, c-format msgid "IceWm Desktop" msgstr "IceWM 桌面" #: share/meta-task/compssUsers.pl:146 #, c-format msgid "Other Graphical Desktops" msgstr "其他圖型桌面軟體" #: share/meta-task/compssUsers.pl:147 #, c-format msgid "Window Maker, Enlightenment, Fvwm, etc" msgstr "Window Maker、Enlightenment、Fvwm 等" #: share/meta-task/compssUsers.pl:170 #, c-format msgid "Utilities" msgstr "工具軟體" #: share/meta-task/compssUsers.pl:172 share/meta-task/compssUsers.pl:173 #, c-format msgid "SSH Server" msgstr "SSH 伺服主機" #: share/meta-task/compssUsers.pl:177 #, c-format msgid "Webmin" msgstr "Webmin" #: share/meta-task/compssUsers.pl:178 #, c-format msgid "Webmin Remote Configuration Server" msgstr "Webmin 遠端設定伺服器" #: share/meta-task/compssUsers.pl:182 #, c-format msgid "Network Utilities/Monitoring" msgstr "網路工具/監控" #: share/meta-task/compssUsers.pl:183 #, c-format msgid "Monitoring tools, processes accounting, tcpdump, nmap, ..." msgstr "監控工具、程序管理、tcpdump、nmap..." #: share/meta-task/compssUsers.pl:187 #, c-format msgid "Mandriva Wizards" msgstr "Mandriva 精靈" #: share/meta-task/compssUsers.pl:188 #, c-format msgid "Wizards to configure server" msgstr "用來設定伺服器的精靈" #: steps.pm:85 #, c-format msgid "" "An error occurred, but I do not know how to handle it nicely.\n" "Continue at your own risk." msgstr "" "發生了一個錯誤,但我不知道該如何妥善處置它。\n" "要繼續安裝工作的話請小心。" #: steps.pm:436 #, c-format msgid "" "Some important packages did not get installed properly.\n" "Either your cdrom drive or your cdrom is defective.\n" "Check the cdrom on an installed computer using \"rpm -qpl media/main/*.rpm" "\"\n" msgstr "" "有某些重要的套件沒有被適當地安裝。\n" "可能是您的光碟機或者是光碟片有缺陷。\n" "請將光碟放在一個已經安裝好的電腦上使用 \"rpm -qpl media/main/*.rpm\" 來檢查\n" #: steps_auto_install.pm:71 steps_stdio.pm:27 #, c-format msgid "Entering step `%s'\n" msgstr "進入步驟 `%s'\n" #: steps_curses.pm:22 #, c-format msgid "Mandriva Linux Installation %s" msgstr "Mandriva Linux 安裝程式 %s" #: steps_curses.pm:32 #, c-format msgid "/ between elements" msgstr "/ 在元件間移動" #: steps_gtk.pm:82 #, c-format msgid "Xorg server is slow to start. Please wait..." msgstr "Xorg 伺服器的啟動較為緩慢。請稍候..." #: steps_gtk.pm:192 #, c-format msgid "" "Your system is low on resources. You may have some problem installing\n" "Mandriva Linux. If that occurs, you can try a text install instead. For " "this,\n" "press `F1' when booting on CDROM, then enter `text'." msgstr "" "您的系統資源太少,可能會在安裝 Mandriva Linux 的過程中遇到問題。\n" "如果真的發生問題,您或許可以改用文字模式的安裝方式來進行。\n" "要如此作的話,請在光碟開機時按下 `F1',然後輸入 `text'。" #: steps_gtk.pm:259 steps_interactive.pm:435 steps_interactive.pm:564 #: steps_list.pm:30 #, c-format msgid "Package Group Selection" msgstr "套件群組選擇" #: steps_gtk.pm:280 steps_interactive.pm:581 #, c-format msgid "Individual package selection" msgstr "選取單一套件" #: steps_gtk.pm:302 steps_interactive.pm:507 #, c-format msgid "Total size: %d / %d MB" msgstr "總共大小: %d / %d MB" #: steps_gtk.pm:347 #, c-format msgid "Bad package" msgstr "壞掉的套件" #: steps_gtk.pm:349 #, c-format msgid "Version: " msgstr "版本:" #: steps_gtk.pm:350 #, c-format msgid "Size: " msgstr "大小:" #: steps_gtk.pm:350 #, c-format msgid "%d KB\n" msgstr "%d KB\n" #: steps_gtk.pm:351 #, c-format msgid "Importance: " msgstr "重要性:" #: steps_gtk.pm:385 #, c-format msgid "You can not select/unselect this package" msgstr "您不可以選擇/取消選擇這個套件" #: steps_gtk.pm:389 #, c-format msgid "due to missing %s" msgstr "因為遺失 %s" #: steps_gtk.pm:390 #, c-format msgid "due to unsatisfied %s" msgstr "由於沒有滿足 %s" #: steps_gtk.pm:391 #, c-format msgid "trying to promote %s" msgstr "正在嘗試促進 %s" #: steps_gtk.pm:392 #, c-format msgid "in order to keep %s" msgstr "為了要保留 %s" #: steps_gtk.pm:397 #, c-format msgid "" "You can not select this package as there is not enough space left to install " "it" msgstr "您不可以選取這個套件,因為剩餘的空間不足以安裝它。" #: steps_gtk.pm:400 #, c-format msgid "The following packages are going to be installed" msgstr "下列的套件將會被安裝上" #: steps_gtk.pm:401 #, c-format msgid "The following packages are going to be removed" msgstr "下列的套件將會被移除" #: steps_gtk.pm:426 #, c-format msgid "This is a mandatory package, it can not be unselected" msgstr "這是一個必要的套件,您不能不選取它" #: steps_gtk.pm:428 #, c-format msgid "You can not unselect this package. It is already installed" msgstr "您不能不選這個套件。它已經被安裝上了。" #: steps_gtk.pm:430 #, c-format msgid "You can not unselect this package. It must be upgraded" msgstr "您不能不選這個套件,它一定要更新才行。" #: steps_gtk.pm:434 #, c-format msgid "Show automatically selected packages" msgstr "顯示自動被選取的套件" #: steps_gtk.pm:436 #, c-format msgid "Install" msgstr "安裝" #: steps_gtk.pm:439 #, c-format msgid "Load/Save selection" msgstr "載入/儲存選取" #: steps_gtk.pm:440 #, c-format msgid "Updating package selection" msgstr "正在更新套件的選擇" #: steps_gtk.pm:445 #, c-format msgid "Minimal install" msgstr "最小安裝" #: steps_gtk.pm:459 #, c-format msgid "Software Management" msgstr "軟體套件管理" #: steps_gtk.pm:459 steps_interactive.pm:393 #, c-format msgid "Choose the packages you want to install" msgstr "選擇您想要安裝的套件" #: steps_gtk.pm:476 steps_interactive.pm:595 steps_list.pm:32 #, c-format msgid "Installing" msgstr "正在安裝" #: steps_gtk.pm:502 #, c-format msgid "No details" msgstr "沒有詳細資訊" #: steps_gtk.pm:517 #, c-format msgid "Time remaining " msgstr "剩餘時間" #: steps_gtk.pm:518 #, c-format msgid "(estimating...)" msgstr "(正在估計...)" #: steps_gtk.pm:545 #, c-format msgid "%d package" msgid_plural "%d packages" msgstr[0] "%d 個套件" #: steps_gtk.pm:591 steps_interactive.pm:783 steps_list.pm:43 #, c-format msgid "Summary" msgstr "總結" #: steps_gtk.pm:608 #, c-format msgid "Configure" msgstr "設定" #: steps_gtk.pm:625 steps_interactive.pm:779 steps_interactive.pm:935 #, c-format msgid "not configured" msgstr "未被設定" #: steps_gtk.pm:661 steps_interactive.pm:278 #, c-format msgid "" "The following installation media have been found.\n" "If you want to skip some of them, you can unselect them now." msgstr "" "已經找到下列的安裝媒介。\n" "如果您想略過它們,您現在可以將它們取消選取。" #: steps_gtk.pm:670 steps_interactive.pm:284 #, c-format msgid "" "You have the option to copy the contents of the CDs onto the hard drive " "before installation.\n" "It will then continue from the hard drive and the packages will remain " "available once the system is fully installed." msgstr "" "您可以選擇在安裝前將光碟的內容複製到硬碟。稍候將會由硬碟繼續安裝,並且這些套" "件\n" "在安裝完畢之後仍然可以繼續使用。" #: steps_gtk.pm:672 steps_interactive.pm:286 #, c-format msgid "Copy whole CDs" msgstr "複製整張光碟" #: steps_interactive.pm:38 #, c-format msgid "An error occurred" msgstr "發生一個錯誤" #: steps_interactive.pm:97 #, c-format msgid "Please choose your keyboard layout." msgstr "請選取鍵盤排列的樣式。" #: steps_interactive.pm:99 #, c-format msgid "Here is the full list of available keyboards" msgstr "以下是所有可用的的鍵盤" #: steps_interactive.pm:129 #, c-format msgid "Install/Upgrade" msgstr "安裝/升級" #: steps_interactive.pm:130 #, c-format msgid "Is this an install or an upgrade?" msgstr "這是安裝或是升級?" #: steps_interactive.pm:134 #, c-format msgid "" "_: This is a noun:\n" "Install" msgstr "安裝" #: steps_interactive.pm:136 #, c-format msgid "Upgrade %s" msgstr "升級 %s" #: steps_interactive.pm:140 #, c-format msgid "Upgrade from a 32bit to a 64bit distribution is not supported" msgstr "不支援從 32 位元升級至 64 位元的發行版" #: steps_interactive.pm:144 #, c-format msgid "Upgrade from a 64bit to a 32bit distribution is not supported" msgstr "不支援從 64 位元升級至 32 位元的發行版" #: steps_interactive.pm:158 #, c-format msgid "Encryption key for %s" msgstr "加密金鑰於 %s" #: steps_interactive.pm:194 #, c-format msgid "IDE" msgstr "IDE" #: steps_interactive.pm:194 #, c-format msgid "Configuring IDE" msgstr "正在設定 IDE" #: steps_interactive.pm:231 #, c-format msgid "" "No free space for 1MB bootstrap! Install will continue, but to boot your " "system, you'll need to create the bootstrap partition in DiskDrake" msgstr "" "沒有足夠的可用空間安裝 bootstrap!安裝還是會繼續,但是您必須在 DiskDrake\n" "中建立 bootstrap 分割來啟動您的系統" #: steps_interactive.pm:236 #, c-format msgid "" "You'll need to create a PPC PReP Boot bootstrap! Install will continue, but " "to boot your system, you'll need to create the bootstrap partition in " "DiskDrake" msgstr "" "您需要建立一個 PPC PReP 開機 bootstrap!安裝還是會繼續,但是您必須在 " "DiskDrake 中建立 bootstrap 分割來啟動您的系統" #: steps_interactive.pm:328 #, c-format msgid "" "Change your Cd-Rom!\n" "Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when " "done.\n" "If you do not have it, press Cancel to avoid installation from this Cd-Rom." msgstr "" "更換光碟片!\n" "請插入標示為 \"%s\" 的光碟於您的光碟機中,完成後請按下確定。\n" "若是您沒有這片光碟,請點選取消以略過這一片光碟的安裝。" #: steps_interactive.pm:350 #, c-format msgid "Looking for available packages..." msgstr "正在搜尋可以用的套件..." #: steps_interactive.pm:358 #, c-format msgid "" "Your system does not have enough space left for installation or upgrade (%" "dMB > %dMB)" msgstr "您的系統剩餘的空間不足以安裝或升級 (%dMB > %dMB)" #: steps_interactive.pm:405 #, c-format msgid "" "Please choose load or save package selection.\n" "The format is the same as auto_install generated files." msgstr "" "請選擇要載入或者儲存套件選擇到磁片上。\n" "它使用與自動安裝所產生的磁片相同的格式。" #: steps_interactive.pm:407 #, c-format msgid "Load" msgstr "載入" #: steps_interactive.pm:407 #, c-format msgid "Save" msgstr "儲存" #: steps_interactive.pm:415 #, c-format msgid "Bad file" msgstr "損壞的檔案" #: steps_interactive.pm:431 #, c-format msgid "Install Mandriva KDE Desktop" msgstr "安裝 Mandriva KDE 桌面" #: steps_interactive.pm:432 #, c-format msgid "Install Mandriva GNOME Desktop" msgstr "安裝 Mandriva GNOME 桌面" #: steps_interactive.pm:433 #, c-format msgid "Custom install" msgstr "自訂安裝" #: steps_interactive.pm:436 #, c-format msgid "You can choose your workstation desktop profile: KDE, GNOME or Custom" msgstr "您可以選擇您的工作站的桌面設定檔:KDE, GNOME 或自訂" #: steps_interactive.pm:521 #, c-format msgid "Selected size is larger than available space" msgstr "所選取的大小超過可用的空間" #: steps_interactive.pm:536 #, c-format msgid "Type of install" msgstr "安裝類型" #: steps_interactive.pm:537 #, c-format msgid "" "You have not selected any group of packages.\n" "Please choose the minimal installation you want:" msgstr "" "您並未選取任何套件群組。\n" "請選擇您想要的最小安裝:" #: steps_interactive.pm:540 #, c-format msgid "With X" msgstr "包含 X 環境" #: steps_interactive.pm:541 #, c-format msgid "With basic documentation (recommended!)" msgstr "包含基本的說明文件 (建議的!)" #: steps_interactive.pm:542 #, c-format msgid "Truly minimal install (especially no urpmi)" msgstr "真正最小安裝 (尤其無 urpmi)" #: steps_interactive.pm:596 #, c-format msgid "Preparing installation" msgstr "正在準備安裝" #: steps_interactive.pm:604 #, c-format msgid "Installing package %s" msgstr "正在安裝套件 %s" #: steps_interactive.pm:628 #, c-format msgid "There was an error ordering packages:" msgstr "排列套件時發生錯誤:" #: steps_interactive.pm:628 #, c-format msgid "Go on anyway?" msgstr "無論如何都要繼續嗎?" #: steps_interactive.pm:632 #, c-format msgid "Retry" msgstr "重試" #: steps_interactive.pm:633 #, c-format msgid "Skip this package" msgstr "略過這個套件" #: steps_interactive.pm:634 #, c-format msgid "Skip all packages from medium \"%s\"" msgstr "略過所有 %s 媒體的套件" #: steps_interactive.pm:635 #, c-format msgid "Go back to media and packages selection" msgstr "回到媒體與套件選擇" #: steps_interactive.pm:638 #, c-format msgid "There was an error installing package %s." msgstr "安裝 %s 套件時發生錯誤。" #: steps_interactive.pm:656 #, c-format msgid "Post-install configuration" msgstr "安裝後的設定" #: steps_interactive.pm:663 #, c-format msgid "Please ensure the Update Modules media is in drive %s" msgstr "請確定更新模組媒介位於磁碟機 %s 中" #: steps_interactive.pm:691 steps_list.pm:47 #, c-format msgid "Updates" msgstr "更新" #: steps_interactive.pm:692 #, c-format msgid "" "You now have the opportunity to download updated packages. These packages\n" "have been updated after the distribution was released. They may\n" "contain security or bug fixes.\n" "\n" "To download these packages, you will need to have a working Internet \n" "connection.\n" "\n" "Do you want to install the updates?" msgstr "" "您現在有機會下載更新套件。這些套件在發行版釋放之後已經被更新過了。\n" "他們或許有安全性或臭蟲修正。\n" "\n" "要下載這些套件,您需要有正常運作的網際網路連線。\n" "\n" "您想要安裝更新嗎?" #: steps_interactive.pm:714 #, c-format msgid "Contacting the mirror to get the list of available packages..." msgstr "聯繫映射站台以取得可用的程式套件列表..." #: steps_interactive.pm:720 #, c-format msgid "Unable to contact mirror %s" msgstr "無法聯繫映射站台 %s" #. -PO: example: lilo-graphic on /dev/hda1 #: steps_interactive.pm:826 #, c-format msgid "%s on %s" msgstr "%2$s 上的 %1$s" #: steps_interactive.pm:860 steps_interactive.pm:867 steps_interactive.pm:881 #: steps_interactive.pm:899 steps_interactive.pm:914 #, c-format msgid "Hardware" msgstr "硬體" #: steps_interactive.pm:882 steps_interactive.pm:900 #, c-format msgid "Sound card" msgstr "音效卡" #: steps_interactive.pm:903 #, c-format msgid "Do you have an ISA sound card?" msgstr "您有 ISA 音效卡嗎?" #: steps_interactive.pm:905 #, c-format msgid "" "Run \"alsaconf\" or \"sndconfig\" after installation to configure your sound " "card" msgstr "請在安裝完畢後,執行 \"alsaconf\" 或 \"sndconfig\" 來設定您的音效卡" #: steps_interactive.pm:907 #, c-format msgid "No sound card detected. Try \"harddrake\" after installation" msgstr "沒偵測到任何音效卡。請在安裝後嘗試 \"harddrake\" 進行設定" #: steps_interactive.pm:915 #, c-format msgid "Graphical interface" msgstr "圖形介面" #: steps_interactive.pm:922 steps_interactive.pm:933 #, c-format msgid "Network & Internet" msgstr "網路與網際網路" #: steps_interactive.pm:934 #, c-format msgid "Proxies" msgstr "代理伺服器" #: steps_interactive.pm:935 #, c-format msgid "configured" msgstr "已設定" #: steps_interactive.pm:945 #, c-format msgid "Security Level" msgstr "安全層級" #: steps_interactive.pm:964 #, c-format msgid "Firewall" msgstr "防火牆" #: steps_interactive.pm:968 #, c-format msgid "activated" msgstr "已啟用" #: steps_interactive.pm:968 #, c-format msgid "disabled" msgstr "已停用" #: steps_interactive.pm:982 #, c-format msgid "You have not configured X. Are you sure you really want this?" msgstr "您尚未設定 X。您確定您真的要這樣做?" #: steps_interactive.pm:1009 #, c-format msgid "Preparing bootloader..." msgstr "正在準備開機載入程式..." #: steps_interactive.pm:1019 #, c-format msgid "" "You appear to have an OldWorld or Unknown machine, the yaboot bootloader " "will not work for you. The install will continue, but you'll need to use " "BootX or some other means to boot your machine. The kernel argument for the " "root fs is: root=%s" msgstr "" "您的系統似乎有 OldWorld 或者是其他不認識的機器,\n" "這將會導致 yaboot 開機載入器無法正常運作。\n" "安裝還是會繼續下去,不過您將需要使用 bootX 或某些其他方法來啟動您的機器。" "root fs 的核心參數是:root=%s" #: steps_interactive.pm:1025 #, c-format msgid "Do you want to use aboot?" msgstr "您要使用 aboot 嗎?" #: steps_interactive.pm:1028 #, c-format msgid "" "Error installing aboot, \n" "try to force installation even if that destroys the first partition?" msgstr "" "安裝 aboot 時發生錯誤,\n" "您要冒著可能毀損第一個分割區的危險強制安裝嗎?" #: steps_interactive.pm:1040 #, c-format msgid "" "In this security level, access to the files in the Windows partition is " "restricted to the administrator." msgstr "在這個安全層級中,只有管理者能夠存取位於 Windows 分割區的檔案。" #: steps_interactive.pm:1072 #, c-format msgid "Insert a blank floppy in drive %s" msgstr "請在 %s 中插入一片空白磁片" #: steps_interactive.pm:1074 #, c-format msgid "Creating auto install floppy..." msgstr "正在製作自動安裝磁片..." #: steps_interactive.pm:1085 #, c-format msgid "" "Some steps are not completed.\n" "\n" "Do you really want to quit now?" msgstr "" "還有些步驟沒有完成。\n" "\n" "您確定要結束安裝程式?" #: steps_interactive.pm:1095 #, c-format msgid "Congratulations" msgstr "恭喜" #: steps_interactive.pm:1099 #, c-format msgid "Reboot" msgstr "重新開機" #: steps_interactive.pm:1103 steps_interactive.pm:1104 #, c-format msgid "Generate auto install floppy" msgstr "製作自動安裝磁片" #: steps_interactive.pm:1105 #, c-format msgid "" "The auto install can be fully automated if wanted,\n" "in that case it will take over the hard drive!!\n" "(this is meant for installing on another box).\n" "\n" "You may prefer to replay the installation.\n" msgstr "" "需要的話,自動安裝可以完全自動化的安裝系統,在這種\n" "情況下它將接管硬碟!\n" "(這是設計來安裝於另一台機器上的)。\n" "\n" "您可以重演安裝過程。\n" #: steps_interactive.pm:1110 #, c-format msgid "Replay" msgstr "重播" #: steps_interactive.pm:1110 #, c-format msgid "Automated" msgstr "自動化" #: steps_interactive.pm:1113 #, c-format msgid "Save packages selection" msgstr "儲存套件選擇" #. -PO: please keep the following messages very short: they must fit in the left list of the installer!!! #: steps_list.pm:16 #, c-format msgid "" "_: Keep these entry short\n" "Language" msgstr "語言" #: steps_list.pm:16 steps_list.pm:23 #, c-format msgid "Localization" msgstr "地區化" #: steps_list.pm:17 #, c-format msgid "" "_: Keep these entry short\n" "License" msgstr "授權" #: steps_list.pm:18 #, c-format msgid "" "_: Keep these entry short\n" "Mouse" msgstr "滑鼠" #: steps_list.pm:19 steps_list.pm:20 #, c-format msgid "" "_: Keep these entry short\n" "Hard drive detection" msgstr "硬碟偵測" #: steps_list.pm:21 steps_list.pm:22 #, c-format msgid "" "_: Keep these entry short\n" "Installation class" msgstr "安裝類別" #: steps_list.pm:23 #, c-format msgid "" "_: Keep these entry short\n" "Keyboard" msgstr "鍵盤" #: steps_list.pm:24 #, c-format msgid "" "_: Keep these entry short\n" "Security" msgstr "安全性" #: steps_list.pm:25 #, c-format msgid "" "_: Keep these entry short\n" "Partitioning" msgstr "分割磁區" #: steps_list.pm:27 steps_list.pm:28 #, c-format msgid "" "_: Keep these entry short\n" "Formatting" msgstr "正在格式化" #: steps_list.pm:29 #, c-format msgid "" "_: Keep these entry short\n" "Choosing packages" msgstr "選取程式套件" #: steps_list.pm:31 #, c-format msgid "" "_: Keep these entry short\n" "Installing" msgstr "正在安裝" #: steps_list.pm:34 #, c-format msgid "" "_: Keep these entry short\n" "Users" msgstr "使用者" #: steps_list.pm:36 steps_list.pm:37 #, c-format msgid "" "_: Keep these entry short\n" "Networking" msgstr "網路" #: steps_list.pm:38 steps_list.pm:39 #, c-format msgid "" "_: Keep these entry short\n" "Bootloader" msgstr "開機載入器" #: steps_list.pm:40 steps_list.pm:41 #, c-format msgid "" "_: Keep these entry short\n" "Configure X" msgstr "設定 X 環境" #: steps_list.pm:42 #, c-format msgid "" "_: Keep these entry short\n" "Summary" msgstr "總結" #: steps_list.pm:44 steps_list.pm:45 #, c-format msgid "" "_: Keep these entry short\n" "Services" msgstr "服務" #: steps_list.pm:46 #, c-format msgid "" "_: Keep these entry short\n" "Updates" msgstr "更新" #: steps_list.pm:48 #, c-format msgid "" "_: Keep these entry short\n" "Exit" msgstr "離開" #~ msgid "All" #~ msgstr "全部" #~ msgid "TV card" #~ msgstr "電視卡" #~ msgid "Boot" #~ msgstr "開機" #~ msgid "" #~ "_: Keep these entry short\n" #~ "Authentication" #~ msgstr "認證方式" #~ msgid "Arkeia" #~ msgstr "Arkeia" #~ msgid "Flatout" #~ msgstr "Flatout" #~ msgid "Gwenview" #~ msgstr "Gwenview" #~ msgid "3D" #~ msgstr "3D" #~ msgid "CMS" #~ msgstr "CMS" #~ msgid "CRM" #~ msgstr "CRM" #~ msgid "2007 product line" #~ msgstr "2007 產品線" #~ msgid "Invictus Firewall" #~ msgstr "Invictus 防火牆" #~ msgid "Discovery Live Mode" #~ msgstr "Discovery Live 模式" #~ msgid "How to register" #~ msgstr "如何註冊" #~ msgid "Rpmdrake 2" #~ msgstr "Rpmdrake 2" #~ msgid "Mandriva Online Services" #~ msgstr "Mandriva Online 服務" #~ msgid "New Theme" #~ msgstr "新的佈景主題" #~ msgid "Web 2.0" #~ msgstr "Web 2.0" #~ msgid "Kaspersky" #~ msgstr "Kaspersky" #~ msgid "LinDVD" #~ msgstr "LinDVD" #~ msgid "Skype" #~ msgstr "Skype" #~ msgid "Transgaming/Cedega" #~ msgstr "Transgaming/Cedega" #~ msgid "DrakVPN" #~ msgstr "DrakVPN" #~ msgid "(%d package, %d MB)" #~ msgid_plural "(%d packages, %d MB)" #~ msgstr[0] "(%d 個套件,共 %d MB)" #~ msgid "%d packages" #~ msgstr "%d 個套件" #~ msgid "Language" #~ msgstr "語言" #~ msgid "License" #~ msgstr "授權" #~ msgid "Installation class" #~ msgstr "安裝類別" #~ msgid "Formatting" #~ msgstr "正在格式化" #~ msgid "Choosing packages" #~ msgstr "選取程式套件" #~ msgid "Users" #~ msgstr "使用者" #~ msgid "Networking" #~ msgstr "網路" #~ msgid "Configure X" #~ msgstr "設定 X 環境" #~ msgid "" #~ "Can not access kernel modules corresponding to your kernel (file %s is " #~ "missing), this generally means your boot floppy in not in sync with the " #~ "Installation medium (please create a newer boot floppy)" #~ msgstr "" #~ "無法存取對應您的核心的核心模組 (檔案 %s 遺失),這一般表示您的開機軟片不同" #~ "步於\n" #~ "安裝媒介 (請建立一個更新的開機磁片)" 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
package install_any; # $Id$

use diagnostics;
use strict;

use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @needToCopy @needToCopyIfRequiresSatisfied $boot_medium @advertising_images);

@ISA = qw(Exporter);
%EXPORT_TAGS = (
    all => [ qw(getNextStep spawnShell addToBeDone) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;

#-######################################################################################
#- misc imports
#-######################################################################################
use MDK::Common::System;
use common;
use run_program;
use partition_table qw(:types);
use partition_table_raw;
use devices;
use fsedit;
use modules;
use detect_devices;
use lang;
use any;
use log;
use fs;

#- package that have to be copied for proper installation (just to avoid changing cdrom)
#- here XFree86 is copied entirey if not already installed, maybe better to copy only server.
#- considered obsoletes :
#- XFree86-8514 XFree86-AGX XFree86-Mach32 XFree86-Mach8 XFree86-Mono XFree86-P9000 
#- XFree86-W32 XFree86-I128 XFree86-VGA16 XFree86-3DLabs 
@needToCopy = qw(
XFree86-Mach64 XFree86-S3 XFree86-S3V XFree86-SVGA 
XFree86-Sun XFree86-SunMono XFree86-Sun24 XFree86-FBDev XFree86-server
XFree86 XFree86-glide-module Device3Dfx Glide_V3-DRI Glide_V5 Mesa
dhcpcd pump dhcpxd dhcp-client isdn4net isdn4k-utils dev pptp-adsl rp-pppoe ppp ypbind
autologin
foomatic printer-utils printer-testpages gimpprint rlpr samba-client ncpfs nc
cups xpp qtcups kups cups-drivers lpr LPRng pdq ImageMagick
);
#- package that have to be copied only if all their requires are satisfied.
@needToCopyIfRequiresSatisfied = qw(
Mesa-common
);

#- boot medium (the first medium to take into account).
$boot_medium = 1;

#-######################################################################################
#- Media change variables&functions
#-######################################################################################
my $postinstall_rpms = '';
my $current_medium = $boot_medium;
my $asked_medium = $boot_medium;
my $cdrom = undef;
sub useMedium($) {
    #- before ejecting the first CD, there are some files to copy!
    #- does nothing if the function has already been called.
    $_[0] > 1 and $::o->{method} eq 'cdrom' and setup_postinstall_rpms($::o->{prefix}, $::o->{packages});

    $asked_medium eq $_[0] or log::l("selecting new medium '$_[0]'");
    $asked_medium = $_[0];
}
sub changeMedium($$) {
    my ($method, $medium) = @_;
    log::l("change to medium $medium for method $method (refused by default)");
    0;
}
sub relGetFile($) {
    local $_ = $_[0];
    m|\.rpm$| ? "$::o->{packages}{mediums}{$asked_medium}{rpmsdir}/$_" : $_;
}
sub askChangeMedium($$) {
    my ($method, $medium) = @_;
    my $allow;
    do {
	eval { $allow = changeMedium($method, $medium) };
    } while ($@); #- really it is not allowed to die in changeMedium!!! or install will cores with rpmlib!!!
    $allow or $::o->{packages}{mediums}{$medium}{selected} = undef; #- disable selected if medium refused.
    $allow;
}
sub errorOpeningFile($) {
    my ($file) = @_;
    $file eq 'XXX' and return; #- special case to force closing file after rpmlib transaction.
    $current_medium eq $asked_medium and log::l("errorOpeningFile $file"), return; #- nothing to do in such case.
    $::o->{packages}{mediums}{$asked_medium}{selected} or return; #- not selected means no need for worying about.

    my $max = 32; #- always refuse after $max tries.
    if ($::o->{method} eq "cdrom") {
	cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1;
	return unless $cdrom;
	ejectCdrom($cdrom);
	while ($max > 0 && askChangeMedium($::o->{method}, $asked_medium)) {
	    $current_medium = $asked_medium;
	    eval { fs::mount($cdrom, "/tmp/image", "iso9660", 'readonly') };
	    my $getFile = getFile($file); 
	    $getFile && @advertising_images and copy_advertising($::o);
	    $getFile and return $getFile;
	    $current_medium = 'unknown'; #- don't know what CD is inserted now.
	    ejectCdrom($cdrom);
	    --$max;
	}
    } else {
	while ($max > 0 && askChangeMedium($::o->{method}, $asked_medium)) {
	    $current_medium = $asked_medium;
	    my $getFile = getFile($file); $getFile and return $getFile;
	    $current_medium = 'unknown'; #- don't know what CD image has been copied.
	    --$max;
	}
    }

    #- keep in mind the asked medium has been refused on this way.
    #- this means it is no more selected.
    $::o->{packages}{mediums}{$asked_medium}{selected} = undef;

    #- on cancel, we can expect the current medium to be undefined too,
    #- this enable remounting if selecting a package back.
    $current_medium = 'unknown';

    return;
}
sub getFile {
    my ($f, $method) = @_;
    log::l("getFile $f:$method");
    my $rel = relGetFile($f);
    do {
	if ($method =~ /crypto/i) {
	    require crypto;
	    crypto::getFile($f);
	} elsif ($::o->{method} eq "ftp") {
	    require ftp;
	    ftp::getFile($rel);
	} elsif ($::o->{method} eq "http") {
	    require http;
	    http::getFile($rel);
	} else {
	    #- try to open the file, but examine if it is present in the repository, this allow
	    #- handling changing a media when some of the file on the first CD has been copied
	    #- to other to avoid media change...
	    my $f2 = "$postinstall_rpms/$f";
	    $f2 = "/tmp/image/$rel" unless $postinstall_rpms && -e $f2;
	    open GETFILE, $f2 and *GETFILE;
	}
    } || errorOpeningFile($f);
}
sub getAndSaveFile {
    my ($file, $local) = @_ == 1 ? ("Mandrake/mdkinst$_[0]", $_[0]) : @_;
    local *F; open F, ">$local" or return;
    local $/ = \ (16 * 1024);
    my $f = ref($file) ? $file : getFile($file) or return;
    local $_;
    while (<$f>) { syswrite F, $_ }
    1;
}


#-######################################################################################
#- Post installation RPMS from cdrom only, functions
#-######################################################################################
sub setup_postinstall_rpms($$) {
    my ($prefix, $packages) = @_;

    $postinstall_rpms and return;
    $postinstall_rpms = "$prefix/usr/postinstall-rpm";

    require pkgs;
    require commands;

    log::l("postinstall rpms directory set to $postinstall_rpms");
    clean_postinstall_rpms(); #- make sure in case of previous upgrade problem.
    commands::mkdir_('-p', $postinstall_rpms);

    #- compute closure of unselected package that may be copied,
    #- don't complain if package does not exists as it may happen
    #- for the various architecture taken into account (X servers).
    my %toCopy;
    foreach (@needToCopy) {
	my $pkg = pkgs::packageByName($packages, $_);
	pkgs::selectPackage($packages, $pkg, 0, \%toCopy) if $pkg;
    }
    @toCopy{@needToCopyIfRequiresSatisfied} = ();

    my @toCopy = map { pkgs::packageByName($packages, $_) } keys %toCopy;

    #- extract headers of package, this is necessary for getting
    #- the complete filename of each package.
    #- copy the package files in the postinstall RPMS directory.
    #- last arg is default medium '' known as the CD#1.
    pkgs::extractHeaders($prefix, \@toCopy, $packages->{mediums}{1});
    commands::cp((map { "/tmp/image/" . relGetFile(pkgs::packageFile($_)) } @toCopy), $postinstall_rpms);

    log::l("copying Auto Install Floppy");
    getAndSaveInstallFloppy($::o, "$postinstall_rpms/auto_install.img");
}

sub clean_postinstall_rpms() {
    require commands;
    $postinstall_rpms and -d $postinstall_rpms and commands::rm('-rf', $postinstall_rpms);
}


#-######################################################################################
#- Specific Hardware to take into account and associated rpms to install
#-######################################################################################
sub allowNVIDIA_rpms {
    my ($packages) = @_;
    require pkgs;
    if (pkgs::packageByName($packages, "NVIDIA_GLX")) {
	#- at this point, we can allow using NVIDIA 3D acceleration packages.
	my @rpms;
	foreach (qw(kernel kernel-smp kernel-entreprise kernel22 kernel22-smp kernel22-secure)) {
	    my $p = pkgs::packageByName($packages, $_);
	    pkgs::packageSelectedOrInstalled($p) or next;
	    my $name = "NVIDIA_kernel-" . pkgs::packageVersion($p) . "-" . pkgs::packageRelease($p) . (/(-.*)/ && $1);
	    pkgs::packageByName($packages, $name) or return;
	    push @rpms, $name;
	}
	@rpms > 0 or return;
	return [ @rpms, "NVIDIA_GLX" ];
    }
}

#-######################################################################################
#- Functions
#-######################################################################################
sub kernelVersion {
    my ($o) = @_;
    require pkgs;
    my $p = pkgs::packageByName($o->{packages}, "kernel");
    $p  ||= pkgs::packageByName($o->{packages}, "kernel22");
    $p or die "I couldn't find the kernel package!";
    pkgs::packageVersion($p) . "-" . pkgs::packageRelease($p);
}


sub getNextStep {
    my ($s) = $::o->{steps}{first};
    $s = $::o->{steps}{$s}{next} while $::o->{steps}{$s}{done} || !$::o->{steps}{$s}{reachable};
    $s;
}

sub spawnShell {
    return if $::o->{localInstall} || $::testing;

    -x "/bin/sh" or die "cannot open shell - /bin/sh doesn't exist";

    fork and return;

    $ENV{DISPLAY} ||= ":0"; #- why not :pp

    local *F;
    sysopen F, "/dev/tty2", 2 or die "cannot open /dev/tty2 -- no shell will be provided";

    open STDIN, "<&F" or die '';
    open STDOUT, ">&F" or die '';
    open STDERR, ">&F" or die '';
    close F;

    print any::drakx_version(), "\n";

    c::setsid();

    ioctl(STDIN, c::TIOCSCTTY(), 0) or warn "could not set new controlling tty: $!";

    my $busybox = "/usr/bin/busybox";
    exec {-e $busybox ? $busybox : "/bin/sh"} "/bin/sh" or log::l("exec of /bin/sh failed: $!");
}

sub fsck_option {
    my ($o) = @_;
    my $y = $o->{security} < 3 && !$::expert && "-y ";
    substInFile { s/^(\s*fsckoptions="?)(-y )?/$1$y/ } "$o->{prefix}/etc/rc.d/rc.sysinit"; #- " help po, DONT REMOVE
}

sub getAvailableSpace {
    my ($o) = @_;

    #- make sure of this place to be available for installation, this could help a lot.
    #- currently doing a very small install use 36Mb of postinstall-rpm, but installing
    #- these packages may eat up to 90Mb (of course not all the server may be installed!).
    #- 65mb may be a good choice to avoid almost all problem of insuficient space left...
    my $minAvailableSize = 65 * sqr(1024);

    my $n = !$::testing && getAvailableSpace_mounted($o->{prefix}) || 
            getAvailableSpace_raw($o->{fstab}) * 512 / 1.07;
    $n - max(0.1 * $n, $minAvailableSize);
}

sub getAvailableSpace_mounted {
    my ($prefix) = @_;
    my $dir = -d "$prefix/usr" ? "$prefix/usr" : "$prefix";
    my (undef, $free) = MDK::Common::System::df($dir) or return;
    log::l("getAvailableSpace_mounted $free KB");
    $free * 1024 || 1;
}
sub getAvailableSpace_raw {
    my ($fstab) = @_;

    do { $_->{mntpoint} eq '/usr' and return $_->{size} } foreach @$fstab;
    do { $_->{mntpoint} eq '/'    and return $_->{size} } foreach @$fstab;

    if ($::testing) {
	my $nb = 450;
	log::l("taking ${nb}MB for testing");
	return $nb << 11;
    }
    die "missing root partition";
}

sub preConfigureTimezone {
    my ($o) = @_;
    require timezone;
   
    #- can't be done in install cuz' timeconfig %post creates funny things
    add2hash($o->{timezone}, { timezone::read($o->{prefix}) }) if $o->{isUpgrade};

    $o->{timezone}{timezone} ||= timezone::bestTimezone(lang::lang2text($o->{lang}));

    my $utc = $::expert && !grep { isFat($_) || isNT($_) } @{$o->{fstab}};
    my $ntp = timezone::ntp_server($o->{prefix});
    add2hash_($o->{timezone}, { UTC => $utc, ntp => $ntp });
}

sub setPackages {
    my ($o) = @_;

    require pkgs;
    if (!$o->{packages} || is_empty_hash_ref($o->{packages}{names})) {
	$o->{packages} = pkgs::psUsingHdlists($o->{prefix}, $o->{method});

	push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs";
	push @{$o->{default_packages}}, "numlock" if $o->{miscellaneous}{numlock};
	push @{$o->{default_packages}}, "kernel-enterprise" if (availableRamMB() > 800) && (arch() !~ /ia64/);
	push @{$o->{default_packages}}, "kernel22" if c::kernel_version() =~ /^\Q2.2/;
	push @{$o->{default_packages}}, "kernel22-secure" if $o->{security} > 3;
	push @{$o->{default_packages}}, "kernel-smp" if detect_devices::hasSMP();
	push @{$o->{default_packages}}, "kernel-pcmcia-cs" if $o->{pcmcia};
	push @{$o->{default_packages}}, "raidtools" if !is_empty_array_ref($o->{all_hds}{raids});
	push @{$o->{default_packages}}, "lvm" if !is_empty_array_ref($o->{all_hds}{lvms});
	push @{$o->{default_packages}}, "usbd", "hotplug" if modules::get_alias("usb-interface");
	push @{$o->{default_packages}}, "reiserfsprogs" if grep { isThisFs("reiserfs", $_) } @{$o->{fstab}};
	push @{$o->{default_packages}}, "xfsprogs" if grep { isThisFs("xfs", $_) } @{$o->{fstab}};
	push @{$o->{default_packages}}, "jfsprogs" if grep { isThisFs("jfs", $_) } @{$o->{fstab}};
	push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound-slot-0") =~ /^snd-card-/;
	push @{$o->{default_packages}}, "imwheel" if $o->{mouse}{nbuttons} > 3;

	pkgs::getDeps($o->{prefix}, $o->{packages});
	pkgs::selectPackage($o->{packages},
			    pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1);

	#- must be done after selecting base packages (to save memory)
	pkgs::getProvides($o->{packages});

	#- must be done after getProvides
	pkgs::read_rpmsrate($o->{packages}, getFile("Mandrake/base/rpmsrate"));
	($o->{compssUsers}, $o->{compssUsersSorted}) = pkgs::readCompssUsers($o->{meta_class});

	if ($::auto_install && !$o->{interactive} && !$o->{compssUsersChoice}) {
	    $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}{flags}} } @{$o->{compssUsersSorted}};
	}
	if ($o->{interactive} && !$o->{isUpgrade}) {
	    #- by default, choose:
	    $o->{compssUsersChoice}{$_} = 1 foreach 'GNOME', 'KDE', 'CONFIG';
	    $o->{compssUsersChoice}{$_} = 1 
	      foreach map { @{$o->{compssUsers}{$_}{flags}} } 'Workstation|Office Workstation', 'Workstation|Internet station';
	}
	$o->{compssUsersChoice}{uc($_)} = 1 foreach grep { modules::get_that_type($_) } ('tv', 'scanner', 'photo', 'sound');
	$o->{compssUsersChoice}{uc($_)} = 1 foreach map { $_->{driver} =~ /Flag:(.*)/ } detect_devices::probeall();
	$o->{compssUsersChoice}{SYSTEM} = 1;
	$o->{compssUsersChoice}{X} = 1 if $o->{interactive};
	$o->{compssUsersChoice}{BURNER} = 1 if detect_devices::burners();
	$o->{compssUsersChoice}{DVD} = 1 if detect_devices::dvdroms();
	$o->{compssUsersChoice}{PCMCIA} = 1 if detect_devices::hasPCMCIA();
	$o->{compssUsersChoice}{'3D'} = 1 if 
	    detect_devices::matching_desc('Matrox.* G[245][05]0') ||
	    detect_devices::matching_desc('Riva.*128') ||
	    detect_devices::matching_desc('Rage X[CL]') ||
	    detect_devices::matching_desc('Rage Mobility [PL]') ||
	    detect_devices::matching_desc('3D Rage (?:LT|Pro)') ||
	    detect_devices::matching_desc('Voodoo [35]') ||
	    detect_devices::matching_desc('Voodoo Banshee') ||
	    detect_devices::matching_desc('8281[05].* CGC') ||
	    detect_devices::matching_desc('Rage 128') ||
	    detect_devices::matching_desc('Radeon ') ||
	    detect_devices::matching_desc('[nN]Vidia.*T[nN]T2') || #- TNT2 cards
	    detect_devices::matching_desc('[nN]Vidia.*NV[56]') ||
	    detect_devices::matching_desc('[nN]Vidia.*Vanta') ||
	    detect_devices::matching_desc('[nN]Vidia.*GeForce') || #- GeForce cards
	    detect_devices::matching_desc('[nN]Vidia.*NV1[15]') ||
	    detect_devices::matching_desc('[nN]Vidia.*Quadro');


	foreach (map { substr($_, 0, 2) } lang::langs($o->{langs})) {
	    pkgs::packageByName($o->{packages}, "locales-$_") or next;
	    push @{$o->{default_packages}}, "locales-$_";
	    $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1; #- mainly for zh in case of zh_TW.Big5
	}
	foreach (lang::langsLANGUAGE($o->{langs})) {
	    $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1;
	}
    } else {
	#- this has to be done to make sure necessary files for urpmi are
	#- present.
	pkgs::psUpdateHdlistsDeps($o->{prefix}, $o->{method});
    }
}

sub unselectMostPackages {
    my ($o) = @_;
    pkgs::unselectAllPackages($o->{packages});
    pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || next) foreach @{$o->{default_packages}};
}

sub warnAboutNaughtyServers {
    my ($o) = @_;
    my @naughtyServers = pkgs::naughtyServers($o->{packages}) or return 1;
    if (!$o->ask_yesorno('', 
formatAlaTeX(_("You have selected the following server(s): %s


These servers are activated by default. They don't have any known security
issues, but some new could be found. In that case, you must make sure to upgrade
as soon as possible.


Do you really want to install these servers?
", join(", ", @naughtyServers))), 1)) {
	pkgs::unselectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_)) foreach @naughtyServers;
    }
}

sub addToBeDone(&$) {
    my ($f, $step) = @_;

    return &$f() if $::o->{steps}{$step}{done};

    push @{$::o->{steps}{$step}{toBeDone}}, $f;
}

sub setAuthentication {
    my ($o) = @_;
    my ($shadow, $md5, $ldap, $nis) = @{$o->{authentication} || {}}{qw(shadow md5 LDAP NIS)};
    my $p = $o->{prefix};
    #- obsoleted always enabled (in /etc/pam.d/system-auth furthermore) #any::enableMD5Shadow($p, $shadow, $md5);
    any::enableShadow($p) if $shadow;
    if ($ldap) {
	$o->pkg_install(qw(chkauth openldap-clients nss_ldap pam_ldap));
	run_program::rooted($o->{prefix}, "/usr/sbin/chkauth", "ldap", "-D", $o->{netc}{LDAPDOMAIN}, "-s", $ldap);
    } elsif ($nis) {
	#$o->pkg_install(qw(chkauth ypbind yp-tools net-tools));
	#run_program::rooted($o->{prefix}, "/usr/sbin/chkauth", "yp", $domain, "-s", $nis);
	$o->pkg_install("ypbind");
	my $domain = $o->{netc}{NISDOMAIN};
	$domain || $nis ne "broadcast" or die _("Can't use broadcast with no NIS domain");
	my $t = $domain ? "domain $domain" . ($nis ne "broadcast" && " server")
	                : "ypserver";
	substInFile {
	    $_ = "#~$_" unless /^#/;
	    $_ .= "$t $nis\n" if eof;
	} "$p/etc/yp.conf";
	require network;
	network::write_conf("$p/etc/sysconfig/network", $o->{netc});
    }
}

sub killCardServices {
    my $pid = chomp_(cat_("/tmp/cardmgr.pid"));
    $pid and kill(15, $pid); #- send SIGTERM
}

sub unlockCdrom(;$) {
    my ($cdrom) = @_;
    $cdrom or cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1;
    eval { $cdrom and ioctl detect_devices::tryOpen($1), c::CDROM_LOCKDOOR(), 0 };
}
sub ejectCdrom(;$) {
    my ($cdrom) = @_;
    getFile("XXX"); #- close still opened filehandle
    $cdrom ||= $1 if cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image),;
    if ($cdrom) {
	#- umount BEFORE opening the cdrom device otherwise the umount will
	#- D state if the cdrom is already removed
	eval { fs::umount("/tmp/image") };
	eval { ioctl detect_devices::tryOpen($cdrom), c::CDROMEJECT(), 1 };	
    }
}

sub setupFB {
    my ($o, $vga) = @_;

    $vga ||= 785; #- assume at least 640x480x16.

    require bootloader;
    #- update bootloader entries with vga, all kernel are now framebuffer.
    foreach (qw(vmlinuz vmlinuz-secure vmlinuz-smp vmlinuz-hack)) {
	if (my $e = bootloader::get("/boot/$_", $o->{bootloader})) {
	    $e->{vga} = $vga;
	}
    }
    bootloader::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{all_hds}{hds});
    1;
}

sub hdInstallPath() {
    my $tail = first(readlink("/tmp/image") =~ m|^/tmp/hdimage/(.*)|);
    my $head = first(readlink("/tmp/hdimage") =~ m|$::o->{prefix}(.*)|);
    $tail && ($head ? "$head/$tail" : "/mnt/hd/$tail");
}

sub install_urpmi {
    my ($prefix, $method, $mediums) = @_;

    #- rare case where urpmi cannot be installed (no hd install path).
    $method eq 'disk' && !hdInstallPath() and return;

    my @cfg = map_index {
	my $name = $_->{fakemedium};

	#- build synthesis file at install, this will improve performance greatly.
	run_program::rooted($prefix, "parsehdlist", ">", "/var/lib/urpmi/synthesis.hdlist.$name",
			    "--compact", "--provides", "--requires", "/var/lib/urpmi/hdlist.$name.cz");
	run_program::rooted($prefix, "gzip", "-S", ".cz", "/var/lib/urpmi/synthesis.hdlist.$name");
	#- safe guard correct generation of synthesis file.
	-s "$prefix/var/lib/urpmi/synthesis.hdlist.$name.cz" > 24 or unlink "$prefix/var/lib/urpmi/synthesis.hdlist.$name.cz";

	local *LIST;
	my $mask = umask 077;
	open LIST, ">$prefix/var/lib/urpmi/list.$name" or log::l("failed to write list.$name");
	umask $mask;

	my $dir = ${{ nfs => "file://mnt/nfs", 
                      disk => "file:/" . hdInstallPath(),
		      ftp => $ENV{URLPREFIX},
		      http => $ENV{URLPREFIX},
		      cdrom => "removable_cdrom://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}";

	local *FILES; open FILES, "$ENV{LD_LOADER} parsehdlist /tmp/$_->{hdlist} |";
	print LIST "$dir/$_\n" foreach chomp_(<FILES>);
	close FILES or log::l("parsehdlist failed"), return;
	close LIST;

	my ($qname, $qdir) = ($name, $dir);
	$qname =~ s/(\s)/\\$1/g; $qdir =~ s/(\s)/\\$1/g;

	#- output new urpmi.cfg format here.
	"$qname " . ($dir !~ /^(ftp|http)/ && $qdir) . " {
  hdlist: hdlist.$name.cz
  with_hdlist: ../base/$_->{hdlist}
  list: list.$name" . ($dir =~ /removable_([^\s:_]*)/ && "
  removable: /dev/$1") . "
}

";
    } values %$mediums;
    eval { output "$prefix/etc/urpmi/urpmi.cfg", @cfg };
}


#-###############################################################################
#- kde stuff
#-###############################################################################
sub kderc_largedisplay {
    my ($prefix) = @_;

    update_gnomekderc($_, 'KDE', 
		     Contrast => 7,
		     kfmIconStyle => "Large",
		     kpanelIconStyle => "Normal", #- to change to Large when icons looks better
		     KDEIconStyle => "Large") foreach list_skels($prefix, '.kderc');

    substInFile {
	s/^(GridWidth)=85/$1=100/;
	s/^(GridHeight)=70/$1=75/;
    } $_ foreach list_skels($prefix, '.kde/share/config/kfmrc');
}

sub kdeicons_postinstall {
    my ($prefix) = @_;

    #- parse etc/fstab file to search for dos/win, floppy, zip, cdroms icons.
    #- handle both supermount and fsdev usage.
    my %l = (
	     'cdrom' => [ 'cdrom', 'Cd-Rom' ],
	     'zip' => [ 'zip', 'Zip' ],
	     'floppy-ls' => [ 'floppy', 'LS-120' ],
	     'floppy' => [ 'floppy', 'Floppy' ],
    );
    foreach (fs::read_fstab($prefix, "/etc/fstab")) {

	my ($name_, $nb) = $_->{mntpoint} =~ m|.*/(\S+?)(\d*)$/|;
	my ($name, $text) = @{$l{$name_} || []};

	my $f = ${{
	    supermount => sub { $name .= '.fsdev' if $name },
	    vfat => sub { $name = 'Dos_'; $text = $name_ },
	}}{$_->{type}};
	&$f if $f;

	template2userfile($prefix, 
			  "$ENV{SHARE_PATH}/$name.kdelnk.in",
			  "Desktop/$text" .  ($nb && " $nb"). ".kdelnk",
			  1, %$_) if $name;
    }

    # rename the .kdelnk to the name found in the .kdelnk as kde doesn't use it
    # for displaying
    foreach my $dir (grep { -d $_ } list_skels($prefix, 'Desktop')) {
	foreach (grep { /\.kdelnk$/ } all($dir)) {
	    cat_("$dir/$_") =~ /^Name\[\Q$ENV{LANG}\E\]=(.{2,14})$/m
	      and rename "$dir/$_", "$dir/$1.kdelnk";
	}
    }
}

sub kdemove_desktop_file {
    my ($prefix) = @_;
    my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk FLOPPY.kdelnk CDROM.kdelnk);

    #- remove any existing save in Trash of each user and
    #- move appropriate file there after an upgrade.
    foreach my $dir (grep { -d $_ } list_skels($prefix, 'Desktop')) {
	renamef("$dir/$_", "$dir/Trash/$_") 
	  foreach grep { -e "$dir/$_" } @toMove, grep { /\.rpmorig$/ } all($dir)
    }
}


#-###############################################################################
#- auto_install stuff
#-###############################################################################
sub auto_inst_file() { ($::g_auto_install ? "/tmp" : "$::o->{prefix}/root") . "/auto_inst.cfg.pl" }

sub report_bug {
    my ($prefix) = @_;
    any::report_bug($prefix, 'auto_inst' => g_auto_install());
}

sub g_auto_install {
    my ($replay) = @_;
    my $o = {};

    require pkgs;
    $o->{default_packages} = pkgs::selected_leaves($::o->{packages});

    my @fields = qw(mntpoint type size);
    $o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
    
    exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang authentication mouse wacom netc timezone superuser intf keyboard users partitioning isUpgrade manualFstab nomouseprobe crypto security netcnx useSupermount autoExitInstall mkbootdisk); #- TODO modules bootloader 

    if (my $printer = $::o->{printer}) {
	$o->{printer}{$_} = $::o->{printer}{$_} foreach qw(SPOOLER DEFAULT BROWSEPOLLADDR BROWSEPOLLPORT MANUALCUPSCONFIG);
	$o->{printer}{configured} = {};
	foreach my $queue (keys %{$::o->{printer}{configured}}) {
	    my $val = $::o->{printer}{configured}{$queue}{queuedata};
	    exists $val->{$_} and $o->{printer}{configured}{$queue}{queuedata}{$_} = $val->{$_} foreach keys %{$val || {}};
	}
    }

    if (my $card = $::o->{X}{card}) {
	$o->{X}{$_} = $::o->{X}{$_} foreach qw(default_depth resolution_wanted);
	if ($o->{X}{default_depth} and my $depth = $card->{depth}{$o->{X}{default_depth}}) {
	    $depth ||= [];
	    $o->{X}{resolution_wanted} ||= join "x", @{$depth->[0]} unless is_empty_array_ref($depth->[0]);
	    $o->{X}{monitor} = $::o->{X}{monitor} if $::o->{X}{monitor}{manual};
	}
    }

    local $o->{partitioning}{auto_allocate} = !$replay;
    local $o->{autoExitInstall} = !$replay;

    #- deep copy because we're modifying it below
    $o->{users} = [ @{$o->{users} || []} ];

    $_ = { %{$_ || {}} }, delete @$_{qw(oldu oldg password password2)} foreach $o->{superuser}, @{$o->{users} || []};
    
    require Data::Dumper;
    my $str = join('', 
"#!/usr/bin/perl -cw
#
# You should check the syntax of this file before using it in an auto-install.
# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file
# (note the '#!/usr/bin/perl -cw' on the first line).
", 
	 Data::Dumper->Dump([$o], ['$o']), if_($replay, 
qq(\npackage install_steps_auto_install;), q(
$graphical = 1;
push @graphical_steps, 'doPartitionDisks', 'formatPartitions';
)), "\0");
    $str =~ s/ {8}/\t/g; #- replace all 8 space char by only one tabulation, this reduces file size so much :-)
    $str;
}

sub getAndSaveInstallFloppy {
    my ($o, $where) = @_;
    if ($postinstall_rpms && -d $postinstall_rpms && -r "$postinstall_rpms/auto_install.img") {
	log::l("getAndSaveInstallFloppy: using file saved as $postinstall_rpms/auto_install.img");
	require commands;
	commands::cp("-f", "$postinstall_rpms/auto_install.img", $where);
    } else {
	my $image = cat_("/proc/cmdline") =~ /pcmcia/ ? "pcmcia" :
	  ${{ disk => 'hd', cdrom => 'cdrom', ftp => 'network', nfs => 'network', http => 'network' }}{$o->{method}};
	$image .= arch() =~ /sparc64/ && "64"; #- for sparc64 there are a specific set of image.
	getAndSaveFile("images/$image.img", $where) or log::l("failed to write Install Floppy ($image.img) to $where"), return;
    }
    1;
}

sub getAndSaveAutoInstallFloppy {
    my ($o, $replay, $where) = @_;

    eval { modules::load('loop') };

    if (arch() =~ /sparc/) {
	my $imagefile = "$o->{prefix}/tmp/autoinst.img";
	my $mountdir = "$o->{prefix}/tmp/mount"; -d $mountdir or mkdir $mountdir, 0755;
	my $workdir = "$o->{prefix}/tmp/work"; -d $workdir or rmdir $workdir;

	getAndSaveInstallFloppy($o, $imagefile) or return;
        devices::make($_) foreach qw(/dev/loop6 /dev/ram);

	require commands;
        run_program::run("losetup", "/dev/loop6", $imagefile);
        fs::mount("/dev/loop6", $mountdir, "romfs", 'readonly');
        commands::cp("-f", $mountdir, $workdir);
        fs::umount($mountdir);
        run_program::run("losetup", "-d", "/dev/loop6");

	substInFile { s/timeout.*//; s/^(\s*append\s*=\s*\".*)\"/$1 kickstart=floppy\"/ } "$workdir/silo.conf"; #" for po
#-TODO	output "$workdir/ks.cfg", generate_ks_cfg($o);
	output "$workdir/boot.msg", "\n7m",
"!! If you press enter, an auto-install is going to start.
    ALL data on this computer is going to be lost,
    including any Windows partitions !!
", "7m\n";

	local $o->{partitioning}{clearall} = 1;
	output("$workdir/auto_inst.cfg", g_auto_install());

        run_program::run("genromfs", "-d", $workdir, "-f", "/dev/ram", "-A", "2048,/..", "-a", "512", "-V", "DrakX autoinst");
        fs::mount("/dev/ram", $mountdir, 'romfs', 0);
        run_program::run("silo", "-r", $mountdir, "-F", "-i", "/fd.b", "-b", "/second.b", "-C", "/silo.conf");
        fs::umount($mountdir);
        commands::dd("if=/dev/ram", "of=$where", "bs=1440", "count=1024");

        commands::rm("-rf", $workdir, $mountdir, $imagefile);
    } else {
	my $imagefile = "$o->{prefix}/tmp/autoinst.img";
	my $mountdir = "$o->{prefix}/tmp/aif-mount"; -d $mountdir or mkdir $mountdir, 0755;

	my $param = 'kickstart=floppy ' . generate_automatic_stage1_params($o);

	getAndSaveInstallFloppy($o, $imagefile) or return;

	my $dev = devices::set_loop($imagefile) or log::l("couldn't set loopback device"), return;
        fs::mount($dev, $mountdir, 'vfat', 0);

	substInFile { 
	    s/timeout.*/$replay ? 'timeout 1' : ''/e;
	    s/^(\s*append)/$1 $param/ 
	} "$mountdir/syslinux.cfg";

	unlink "$mountdir/help.msg";
	output "$mountdir/boot.msg", "\n0c",
"!! If you press enter, an auto-install is going to start.
   All data on this computer is going to be lost,
   including any Windows partitions !!
", "07\n" if !$replay;

	local $o->{partitioning}{clearall} = !$replay;
	output("$mountdir/auto_inst.cfg", g_auto_install($replay));

	fs::umount($mountdir);
	rmdir $mountdir;
	c::del_loop($dev);
	require commands;
	commands::dd("if=$imagefile", "of=$where", "bs=1440", "count=1024");
	unlink $imagefile;
    }
    1;
}


sub g_default_packages {
    my ($o, $quiet) = @_;

    my $floppy = detect_devices::floppy();

    while (1) {
	$o->ask_okcancel('', _("Insert a FAT formatted floppy in drive %s", $floppy), 1) or return;

	eval { fs::mount(devices::make($floppy), "/floppy", "vfat", 0) };
	last if !$@;
	$o->ask_warn('', _("This floppy is not FAT formatted"));
    }

    require Data::Dumper;
    my $str = Data::Dumper->Dump([ { default_packages => pkgs::selected_leaves($o->{packages}) } ], ['$o']);
    $str =~ s/ {8}/\t/g;
    output('/floppy/auto_inst.cfg', 
	   "# You should always check the syntax with 'perl -cw auto_inst.cfg.pl'\n",
	   "# before testing.  To use it, boot with ``linux defcfg=floppy''\n",
	   $str, "\0");
    fs::umount("/floppy");

    $quiet or $o->ask_warn('', _("To use this saved packages selection, boot installation with ``linux defcfg=floppy''"));
}

sub loadO {
    my ($O, $f) = @_; $f ||= auto_inst_file;
    my $o;
    if ($f =~ /^(floppy|patch)$/) {
	my $f = $f eq "floppy" ? 'auto_inst.cfg' : "patch";
	unless ($::testing) {