aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi/po/eo.po
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2003-03-05 20:06:42 +0000
committerPablo Saratxaga <pablo@mandriva.com>2003-03-05 20:06:42 +0000
commit4febdae56a9b891d9c0d8f0f5f1762948de5ac23 (patch)
treed3ed9a95dd274a392b9fb13bc97bafb69bd2e148 /grpmi/po/eo.po
parent8ec07b7ebfe7c41b0e1b7ef7fe2b55e9f0e3eefd (diff)
downloadrpmdrake-4febdae56a9b891d9c0d8f0f5f1762948de5ac23.tar
rpmdrake-4febdae56a9b891d9c0d8f0f5f1762948de5ac23.tar.gz
rpmdrake-4febdae56a9b891d9c0d8f0f5f1762948de5ac23.tar.bz2
rpmdrake-4febdae56a9b891d9c0d8f0f5f1762948de5ac23.tar.xz
rpmdrake-4febdae56a9b891d9c0d8f0f5f1762948de5ac23.zip
Changed use of msgcat
Diffstat (limited to 'grpmi/po/eo.po')
-rw-r--r--grpmi/po/eo.po136
1 files changed, 68 insertions, 68 deletions
diff --git a/grpmi/po/eo.po b/grpmi/po/eo.po
index 751fad2a..6d62c393 100644
--- a/grpmi/po/eo.po
+++ b/grpmi/po/eo.po
@@ -1,4 +1,4 @@
-# MESAOJ DE MandrakeUpdate.
+# MESAĜOJ DE MandrakeUpdate.
# Copyright (C) 2000, Mandrakesoft
# D. Dale Gulledge <dsplat@rochester.rr.com>, 2000.
#
@@ -10,7 +10,7 @@ msgstr ""
"Last-Translator: D. Dale Gulledge <dsplat@rochester.rr.com>\n"
"Language-Team: Esperanto <eo@li.org>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-3\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../curl_download/curl_download.xs:86
@@ -35,11 +35,11 @@ msgstr "Malsukcesa init\n"
#: ../curl_download/curl_download.xs:132
msgid "Bad URL format\n"
-msgstr "Netaga URL formato\n"
+msgstr "Netaŭga URL formato\n"
#: ../curl_download/curl_download.xs:135
msgid "Bad user format in URL\n"
-msgstr "Netaga uzantoformato en URL\n"
+msgstr "Netaŭga uzantoformato en URL\n"
#: ../curl_download/curl_download.xs:138
msgid "Couldn't resolve proxy\n"
@@ -63,7 +63,7 @@ msgstr "FTP servilo rifuzis atingo al vi\n"
#: ../curl_download/curl_download.xs:153
msgid "FTP user password incorrect\n"
-msgstr "FTP uzanto-pasvorto ne estas usta\n"
+msgstr "FTP uzanto-pasvorto ne estas ĝusta\n"
#: ../curl_download/curl_download.xs:156
msgid "FTP unexpected PASS reply\n"
@@ -79,7 +79,7 @@ msgstr "Stranga respondo de FTP servilo pri PASV\n"
#: ../curl_download/curl_download.xs:165
msgid "FTP unexpected 227 format\n"
-msgstr "Stranga formato de 227 mesao\n"
+msgstr "Stranga formato de 227 mesaĝo\n"
#: ../curl_download/curl_download.xs:168
msgid "FTP can't get host\n"
@@ -107,7 +107,7 @@ msgstr "FTP eraro dum skribi\n"
#: ../curl_download/curl_download.xs:188
msgid "FTP quote error\n"
-msgstr "FTP eraro pri citao\n"
+msgstr "FTP eraro pri citaĵo\n"
#: ../curl_download/curl_download.xs:191
#, fuzzy
@@ -120,7 +120,7 @@ msgstr "Skriberaro\n"
#: ../curl_download/curl_download.xs:197
msgid "User name illegally specified\n"
-msgstr "Netage specifita salutnomo\n"
+msgstr "Netaŭge specifita salutnomo\n"
#: ../curl_download/curl_download.xs:200
msgid "FTP couldn't STOR file\n"
@@ -132,7 +132,7 @@ msgstr "Legeraro\n"
#: ../curl_download/curl_download.xs:209
msgid "Time out\n"
-msgstr "Tempodaro finfinis\n"
+msgstr "Tempodaŭro finfinis\n"
#: ../curl_download/curl_download.xs:212
msgid "FTP couldn't set ASCII\n"
@@ -164,7 +164,7 @@ msgstr "SSL konekteraro\n"
#: ../curl_download/curl_download.xs:233
msgid "FTP bad download resume\n"
-msgstr "FTP netaga rekomencado de eluto\n"
+msgstr "FTP netaŭga rekomencado de elŝuto\n"
#: ../curl_download/curl_download.xs:236
msgid "File couldn't read file\n"
@@ -176,7 +176,7 @@ msgstr "LDAP ne povas ligi (bind)\n"
#: ../curl_download/curl_download.xs:242
msgid "LDAP search failed\n"
-msgstr "LDAP sero malsukcesis\n"
+msgstr "LDAP serĉo malsukcesis\n"
#: ../curl_download/curl_download.xs:245
msgid "Library not found\n"
@@ -192,11 +192,11 @@ msgstr "Abortis per revokado\n"
#: ../curl_download/curl_download.xs:254
msgid "Bad function argument\n"
-msgstr "Netaga funkcioargumento\n"
+msgstr "Netaŭga funkcioargumento\n"
#: ../curl_download/curl_download.xs:257
msgid "Bad calling order\n"
-msgstr "Netaga vokordo\n"
+msgstr "Netaŭga vokordo\n"
#: ../curl_download/curl_download.xs:260
#, c-format
@@ -261,22 +261,22 @@ msgstr ""
#: ../rpm/grpmi_rpm.xs:259
#, fuzzy, c-format
msgid "Can't open package `%s'\n"
-msgstr "Ne povas malfermi pakaon"
+msgstr "Ne povas malfermi pakaĵon"
#: ../rpm/grpmi_rpm.xs:264
#, fuzzy, c-format
msgid "Package `%s' is corrupted\n"
-msgstr "Pakao estas malpurita"
+msgstr "Pakaĵo estas malpurita"
#: ../rpm/grpmi_rpm.xs:267
#, fuzzy, c-format
msgid "Package `%s' can't be installed\n"
-msgstr "Pakao ne povas esti instalata"
+msgstr "Pakaĵo ne povas esti instalata"
#: ../rpm/grpmi_rpm.xs:278
#, fuzzy
msgid "Error while checking dependencies"
-msgstr "Eraro dum kontroli dependaojn :("
+msgstr "Eraro dum kontroli dependaĵojn :("
#: ../rpm/grpmi_rpm.xs:299
#, fuzzy
@@ -291,7 +291,7 @@ msgstr " estas bezonata pro %s-%s-%s"
#: ../rpm/grpmi_rpm.xs:317
#, fuzzy
msgid "Error while checking dependencies 2"
-msgstr "Eraro dum kontroli dependaojn :("
+msgstr "Eraro dum kontroli dependaĵojn :("
#: ../rpm/grpmi_rpm.xs:323
#, fuzzy
@@ -336,7 +336,7 @@ msgid ""
"%s\n"
"\n"
"Install aborted."
-msgstr "Instalado estis esigata"
+msgstr "Instalado estis ĉesigata"
#: ../grpmi.pl:1
#, fuzzy, c-format
@@ -366,7 +366,7 @@ msgstr "Skriberaro\n"
#: ../grpmi.pl:1
#, fuzzy, c-format
msgid "Yes to all"
-msgstr "Elektu iujn"
+msgstr "Elektu ĉiujn"
#: ../grpmi.pl:1
#, c-format
@@ -478,14 +478,14 @@ msgstr "Jes"
#~ "The package %s has a wrong signature or\n"
#~ "GnuPG isn't correctly installed"
#~ msgstr ""
-#~ "La pakao %s havas malustan subskribon a\n"
-#~ "GnuPG estis maluste instalata"
+#~ "La pakaĵo %s havas malĝustan subskribon aŭ\n"
+#~ "GnuPG estis malĝuste instalata"
#~ msgid "The package %s is not signed"
-#~ msgstr "La pakao %s ne estas subskribita"
+#~ msgstr "La pakaĵo %s ne estas subskribita"
#~ msgid "Install all"
-#~ msgstr "Instalu io"
+#~ msgstr "Instalu ĉio"
#~ msgid "Install"
#~ msgstr "Instalu"
@@ -517,10 +517,10 @@ msgstr "Jes"
#~ "(c) MandrakeSoft 1999-2000\n"
#~ "released under the GPL"
#~ msgstr ""
-#~ "MandrakeUpdate (Mandrejka isdatigilo)\n"
+#~ "MandrakeUpdate (Mandrejka Ĝisdatigilo)\n"
#~ "\n"
-#~ "(c) Kopirajto e MandrakeSoft 1999-2000\n"
-#~ "havebla sub la enerala Publika GNU-Permesilo"
+#~ "(c) Kopirajto ĉe MandrakeSoft 1999-2000\n"
+#~ "havebla sub la Ĝenerala Publika GNU-Permesilo"
#~ msgid "Error"
#~ msgstr "Eraro"
@@ -568,7 +568,7 @@ msgstr "Jes"
#~ msgstr "sekureco"
#~ msgid "general"
-#~ msgstr "enerala"
+#~ msgstr "ĝenerala"
#~ msgid "bugfix"
#~ msgstr "cimo-riparo"
@@ -584,7 +584,7 @@ msgstr "Jes"
#~ "Cannot retrieve the list of packages to update\n"
#~ "Try with an other mirror"
#~ msgstr ""
-#~ "Ne povas preni la liston de pakaoj por isdatigi\n"
+#~ "Ne povas preni la liston de pakaĵoj por ĝisdatigi\n"
#~ "Provu kun alia spegulo"
#~ msgid "Warning"
@@ -595,8 +595,8 @@ msgstr "Jes"
#~ "You really can screw up your system\n"
#~ "by installing them.\n"
#~ msgstr ""
-#~ "Zorgu! i tiuj pakaoj estas ne bone provitaj.\n"
-#~ "Mi povas fuigi vian komputilon\n"
+#~ "Zorgu! Ĉi tiuj pakaĵoj estas ne bone provitaj.\n"
+#~ "Mi povas fuŝigi vian komputilon\n"
#~ "per instali ilin.\n"
#~ msgid "Source on disk: %s"
@@ -607,7 +607,7 @@ msgstr "Jes"
#~ "Updating the list of packages"
#~ msgstr ""
#~ "Bonvole Atendu\n"
-#~ "Mi isdatigas la liston de pakaoj"
+#~ "Mi ĝisdatigas la liston de pakaĵoj"
#~ msgid ""
#~ "Name: %s\n"
@@ -623,7 +623,7 @@ msgstr "Jes"
#~ msgstr "Nomo: %s"
#~ msgid "%d selected packages: %.1f MB"
-#~ msgstr "%d elektitaj pakaoj: %.1f MB"
+#~ msgstr "%d elektitaj pakaĵoj: %.1f MB"
#~ msgid ""
#~ "GnuPG was not found\n"
@@ -636,12 +636,12 @@ msgstr "Jes"
#~ "Mi ne trovis GnuPG-on\n"
#~ "\n"
#~ "MandrakeUpdate ne povos konfirmi la GPG-an\n"
-#~ "subskribon de la pakaoj\n"
+#~ "subskribon de la pakaĵoj\n"
#~ "\n"
-#~ "Bonvole instalu la gpg-an pakaon\n"
+#~ "Bonvole instalu la gpg-an pakaĵon\n"
#~ msgid "Don't show this message again"
-#~ msgstr "No montru i tiun mesaon denove"
+#~ msgstr "No montru ĉi tiun mesaĝon denove"
#~ msgid "oops %s not found\n"
#~ msgstr "up! %s ne trovita\n"
@@ -650,7 +650,7 @@ msgstr "Jes"
#~ msgstr "Bonvole Atendu"
#~ msgid "0 selected packages: 0.0 MB"
-#~ msgstr "0 elektitaj pakaoj: 0.0 MB"
+#~ msgstr "0 elektitaj pakaĵoj: 0.0 MB"
#~ msgid "/_File"
#~ msgstr "/_Dosiero"
@@ -662,7 +662,7 @@ msgstr "Jes"
#~ msgstr "/Dosiero/-"
#~ msgid "/File/_Quit"
-#~ msgstr "/Dosiero/_esu"
+#~ msgstr "/Dosiero/_Ĉesu"
#~ msgid "/_Help"
#~ msgstr "/_Helpo"
@@ -677,7 +677,7 @@ msgstr "Jes"
#~ msgstr "Instalitaj"
#~ msgid "Update"
-#~ msgstr "isdatigu"
+#~ msgstr "Ĝisdatigu"
#~ msgid "Size"
#~ msgstr "Grandeco"
@@ -698,7 +698,7 @@ msgstr "Jes"
#~ " -V, --verbose: increase the verbosity level\n"
#~ msgstr ""
#~ " uzado:\n"
-#~ " -h, --help: montru i tiun helpon kaj eliru\n"
+#~ " -h, --help: montru ĉi tiun helpon kaj eliru\n"
#~ " -v, --version: montru la version kaj eliru\n"
#~ " -V, --verbose: pliigi la multvortecon\n"
@@ -710,43 +710,43 @@ msgstr "Jes"
#~ "List"
#~ msgstr ""
#~ "Listo de\n"
-#~ "isdatigaj Dosieroj"
+#~ "Ĝisdatigaj Dosieroj"
#~ msgid "Update the list of packages to update"
-#~ msgstr "isdatigu la liston de pakaojn por isdatigi"
+#~ msgstr "Ĝisdatigu la liston de pakaĵojn por ĝisdatigi"
#~ msgid ""
#~ "Select\n"
#~ "all"
#~ msgstr ""
#~ "Elektu\n"
-#~ "iujn"
+#~ "ĉiujn"
#~ msgid ""
#~ "Unselect\n"
#~ "all"
#~ msgstr ""
#~ "Malelektu\n"
-#~ "iujn"
+#~ "ĉiujn"
#~ msgid "Unselect all"
-#~ msgstr "Malelektu iujn"
+#~ msgstr "Malelektu ĉiujn"
#~ msgid ""
#~ "Do\n"
#~ "updates"
#~ msgstr ""
#~ "Faru\n"
-#~ "isdatigadon"
+#~ "ĝisdatigadon"
#~ msgid "Do Updates"
-#~ msgstr "Faru isdatigojn"
+#~ msgstr "Faru Ĝisdatigojn"
#~ msgid "Normal Updates"
-#~ msgstr "Normalaj isdatigoj"
+#~ msgstr "Normalaj Ĝisdatigoj"
#~ msgid "Development Updates"
-#~ msgstr "Programadaj isdatigoj"
+#~ msgstr "Programadaj Ĝisdatigoj"
#~ msgid "Descriptions"
#~ msgstr "Priskriboj"
@@ -757,10 +757,10 @@ msgstr "Jes"
#~ "When you click on a package you get information about\n"
#~ "the need to update"
#~ msgstr ""
-#~ "La pakaoj estas la isdatigoj por Mandrake\n"
-#~ "Elektu tiujn kiujn vi deziras isdatigi\n"
-#~ "Kiam vi klakos sur pakaonomo vi ricevos informon pri\n"
-#~ "la bezono por isdatigi"
+#~ "La pakaĵoj estas la ĝisdatigoj por Mandrake\n"
+#~ "Elektu tiujn kiujn vi deziras ĝisdatigi\n"
+#~ "Kiam vi klakos sur pakaĵonomo vi ricevos informon pri\n"
+#~ "la bezono por ĝisdatigi"
#~ msgid "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*,*"
#~ msgstr "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-3,*"
@@ -770,16 +770,16 @@ msgstr "Jes"
#~ "Sorting packages"
#~ msgstr ""
#~ "Bonvole Atendu\n"
-#~ "Mi ordigas la pakaojn"
+#~ "Mi ordigas la pakaĵojn"
#~ msgid "Choose your packages"
-#~ msgstr "Elektu viajn pakaojn"
+#~ msgstr "Elektu viajn pakaĵojn"
#~ msgid "Packages to update"
-#~ msgstr "Pakaoj por isdatigi"
+#~ msgstr "Pakaĵoj por ĝisdatigi"
#~ msgid "Packages NOT to update"
-#~ msgstr "Pakaoj NE por isdatigi"
+#~ msgstr "Pakaĵoj NE por ĝisdatigi"
#~ msgid ""
#~ "Caution! You're changing the version.\n"
@@ -788,10 +788,10 @@ msgstr "Jes"
#~ "\n"
#~ "You should only use this if you really know what you're doing.\n"
#~ msgstr ""
-#~ "Averto! Vi angas la version.\n"
-#~ "MandrakeUpdate pensos ke vi vere instalis i tiun version\n"
+#~ "Averto! Vi ŝangas la version.\n"
+#~ "MandrakeUpdate pensos ke vi vere instalis ĉi tiun version\n"
#~ "\n"
-#~ "Vi devus nur uzi i tion se vi vere komprenos kio vi faras.\n"
+#~ "Vi devus nur uzi ĉi tion se vi vere komprenos kio vi faras.\n"
#~ msgid "Preferences for Proxies"
#~ msgstr "Preferoj por Prokuraj Serviloj"
@@ -836,22 +836,22 @@ msgstr "Jes"
#~ msgstr "Versio:"
#~ msgid "Show security updates"
-#~ msgstr "Montru sekurecajn isdatigojn"
+#~ msgstr "Montru sekurecajn ĝisdatigojn"
#~ msgid "Show general updates"
-#~ msgstr "Montru eneraljn isdatigojn"
+#~ msgstr "Montru ĝeneraljn ĝisdatigojn"
#~ msgid "Show bugfix updates"
-#~ msgstr "Montru cimo-riparajn isdatigojn"
+#~ msgstr "Montru cimo-riparajn ĝisdatigojn"
#~ msgid "mirror:"
#~ msgstr "spegulo:"
#~ msgid "Update the list of mirrors"
-#~ msgstr "isdatigu la liston de speguloj"
+#~ msgstr "Ĝisdatigu la liston de speguloj"
#~ msgid "Choose Packages"
-#~ msgstr "Elektu Pakaojn"
+#~ msgstr "Elektu Pakaĵojn"
#~ msgid "Username:"
#~ msgstr "Salutnomo:"
@@ -866,13 +866,13 @@ msgstr "Jes"
#~ msgstr "Ne avertu min se GnuPG ne estas instalita"
#~ msgid "Do not warn if the package isn't signed"
-#~ msgstr "Ne avertu min se la pakao ne estas signaturata"
+#~ msgstr "Ne avertu min se la pakaĵo ne estas signaturata"
#~ msgid "Miscellaneous"
-#~ msgstr "Diversaoj"
+#~ msgstr "Diversaĵoj"
#~ msgid "Timeout:"
-#~ msgstr "Tempodaro:"
+#~ msgstr "Tempodaŭro:"
#~ msgid "(in sec)"
#~ msgstr "(en sekundoj)"
id='n741' href='#n741'>741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874
package fs; # $Id$

use diagnostics;
use strict;

use MDK::Common::System;
use MDK::Common::Various;
use common;
use log;
use devices;
use partition_table qw(:types);
use run_program;
use swap;
use detect_devices;
use modules;
use fsedit;
use loopback;


sub read_fstab {
    my ($prefix, $file, @reading_options) = @_;

    my %comments;
    my $comment;
    my @l = grep {
	if (/^\s*#/) {
	    $comment .= chomp_($_) . "\n";
	    0;
	} else {
	    $comments{$_} = $comment if $comment;
	    $comment = '';
	    1;
	}
    } cat_("$prefix$file");

    #- attach comments at the end of fstab to the previous line
    $comments{$l[-1]} = $comment if $comment;

    map {
	my ($dev, $mntpoint, $type, $options, $freq, $passno) = split;
	my $comment = $comments{$_};

	$options = 'defaults' if $options eq 'rw'; # clean-up for mtab read

	$type = fs2type($type);
	if ($type eq 'supermount') {
	    # normalize this bloody supermount
	    $options = join(",", 'supermount', grep {
		if (/fs=(.*)/) {
		    $type = $1;
		    0;
		} elsif (/dev=(.*)/) {
		    $dev = $1;
		    0;
		} elsif ($_ eq '--') {
		    0;
		} else {
		    1;
		}
	    } split(',', $options));
	} elsif ($type eq 'smb') {
	    # prefering type "smbfs" over "smb"
	    $type = 'smbfs';
	}
	$mntpoint =~ s/\\040/ /g;
	$dev =~ s/\\040/ /g;

	my $h = { 
		 device => $dev, mntpoint => $mntpoint, type => $type, 
		 options => $options, comment => $comment,
		 if_(member('keep_freq_passno', @reading_options), freq => $freq, passno => $passno),
		};

	if ($dev =~ /^LABEL=/) {
	    if (my ($e) = grep { $_->{mntpoint} eq $mntpoint } read_fstab('', '/proc/mounts')) {
		$h->{device_LABEL} = $dev;
		$dev = $h->{device} = $e->{device};
	    }
        }
	if ($dev =~ m,/(tmp|dev)/,) {
	    ($h->{major}, $h->{minor}) = unmakedev((stat "$prefix$dev")[6]);

	    my $symlink = readlink("$prefix$dev");
	    $dev =~ s,/(tmp|dev)/,,;

	    if ($symlink =~ m|^[^/]+$|) {
		$h->{device_alias} = $dev;
		$h->{device} = $symlink;
	    } else {
		$h->{device} = $dev;
	    }
	}

	if ($h->{options} =~ /credentials=/ && !member('verbatim_credentials', @reading_options)) {
	    require network::smb;
	    #- remove credentials=file with username=foo,password=bar,domain=zoo
	    #- the other way is done in fstab_to_string
	    my ($options, $unknown) = mount_options_unpack($h);
	    my $file = delete $options->{'credentials='};
	    my $credentials = network::smb::read_credentials_raw($file);
	    if ($credentials->{username}) {
		$options->{"$_="} = $credentials->{$_} foreach qw(username password domain);
		mount_options_pack($h, $options, $unknown);
	    }
	}

	$h;
    } @l;
}

sub merge_fstabs {
    my ($loose, $fstab, @l) = @_;

    foreach my $p (@$fstab) {
	my ($p2) = grep { fsedit::is_same_hd($_, $p) } @l or next;
	@l       = grep { !fsedit::is_same_hd($_, $p) } @l;

	$p->{mntpoint} = $p2->{mntpoint} if delete $p->{unsafeMntpoint};

	$p->{type} = $p2->{type} if $p2->{type} && !$loose;
	$p->{options} = $p2->{options} if $p2->{options} && !$loose;
	#- important to get isMounted property else DrakX may try to mount already mounted partitions :-(
	add2hash($p, $p2);
	$p->{device_alias} ||= $p2->{device_alias} || $p2->{device} if $p->{device} ne $p2->{device} && $p2->{device} !~ m|/|;

	$p->{type} && $p2->{type} && $p->{type} ne $p2->{type} && type2fs($p) ne type2fs($p2) &&
	  $p->{type} ne 'auto' && $p2->{type} ne 'auto' and
	    log::l("err, fstab and partition table do not agree for $p->{device} type: " .
		   (type2fs($p) || type2name($p->{type})) . " vs ", (type2fs($p2) || type2name($p2->{type})));
    }
    @l;
}

sub add2all_hds {
    my ($all_hds, @l) = @_;

    @l = merge_fstabs('', [ fsedit::get_really_all_fstab($all_hds) ], @l);

    foreach (@l) {
	my $s = 
	    isThisFs('nfs', $_) ? 'nfss' :
	    isThisFs('smbfs', $_) ? 'smbs' :
	    isThisFs('davfs', $_) ? 'davs' :
	    'special';
	push @{$all_hds->{$s}}, $_;
    }
}

sub get_major_minor {
    eval {
	my (undef, $major, $minor) = devices::entry($_->{device});
	($_->{major}, $_->{minor}) = ($major, $minor);
    } foreach @_;
}

sub merge_info_from_mtab {
    my ($fstab) = @_;

    my @l1 = map { my $l = $_; 
		   my %l = (type => fs2type('swap')); 
		   $l{$_} = $l->{$_} foreach qw(device major minor); 
		   \%l;
	       } read_fstab('', '/proc/swaps');
    
    my @l2 = map { read_fstab('', $_) } '/etc/mtab', '/proc/mounts';

    foreach (@l1, @l2) {
	log::l("found mounted partition on $_->{device} with $_->{mntpoint}");
	if ($::isInstall && $_->{mntpoint} eq '/tmp/hdimage') {
	    log::l("found hdimage on $_->{device}");
	    $_->{real_mntpoint} = delete $_->{mntpoint};
	    $_->{mntpoint} = common::usingRamdisk() && "/mnt/hd"; #- remap for hd install.
	}
	$_->{isMounted} = $_->{isFormatted} = 1;
	delete $_->{options};
    } 
    merge_fstabs('loose', $fstab, @l1, @l2);
}

# - when using "$loose", it does not merge in type&options from the fstab
sub merge_info_from_fstab {
    my ($fstab, $prefix, $uniq, $loose) = @_;

    my @l = grep { 
	if ($uniq) {
	    my $part = fsedit::mntpoint2part($_->{mntpoint}, $fstab);
	    !$part || fsedit::is_same_hd($part, $_); #- keep it only if it is the mountpoint AND the same device
	} else {
	    1;
	}
    } read_fstab($prefix, "/etc/fstab", 'keep_freq_passno');

    merge_fstabs($loose, $fstab, @l);
}

sub prepare_write_fstab {
    my ($fstab, $prefix, $keep_smb_credentials) = @_;
    $prefix ||= '';

    my %new;
    my @smb_credentials;
    my @l = map { 
	my $device = 
	  isLoopback($_) ? 
	      ($_->{mntpoint} eq '/' ? "/initrd/loopfs" : "$_->{loopback_device}{mntpoint}") . $_->{loopback_file} :
	  part2device($prefix, $_->{device}, $_->{type});

	my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}};
	mkdir_p("$prefix$real_mntpoint") if $real_mntpoint =~ m|^/|;
	my $mntpoint = loopback::carryRootLoopback($_) ? '/initrd/loopfs' : $real_mntpoint;

	my ($freq, $passno) =
	  exists $_->{freq} ?
	    ($_->{freq}, $_->{passno}) :
	  isTrueFS($_) && $_->{options} !~ /encryption=/ ? 
	    (1, $_->{mntpoint} eq '/' ? 1 : loopback::carryRootLoopback($_) ? 0 : 2) : 
	    (0, 0);

	if (($device eq 'none' || !$new{$device}) && ($mntpoint eq 'swap' || !$new{$mntpoint})) {
	    #- keep in mind the new line for fstab.
	    $new{$device} = 1;
	    $new{$mntpoint} = 1;

	    my $options = $_->{options};

	    if (isThisFs('smbfs', $_) && $options =~ /password=/ && !$keep_smb_credentials) {
		require network::smb;
		if (my ($opts, $smb_credentials) = network::smb::fstab_entry_to_credentials($_)) {
		    $options = $opts;
		    push @smb_credentials, $smb_credentials;
		}
	    }

	    my $type = type2fs($_);

	    my $dev = 
	      $_->{device_LABEL} ? $_->{device_LABEL} :
	      $_->{device_alias} ? "/dev/$_->{device_alias}" : $device;

	    $mntpoint =~ s/ /\\040/g;
	    $dev =~ s/ /\\040/g;

	    # handle bloody supermount special case
	    if ($options =~ /supermount/) {
		my @l = grep { $_ ne 'supermount' } split(',', $options);
		my @l1 = grep { member($_, 'ro', 'exec') } @l;
		my @l2 = difference2(\@l, \@l1);
		$options = join(",", "dev=$dev", "fs=$type", @l1, if_(@l2, '--', @l2));
		($dev, $type) = ('none', 'supermount');
	    }

	    [ $mntpoint, $_->{comment} . join(' ', $dev, $mntpoint, $type, $options || 'defaults', $freq, $passno) . "\n" ];
	} else {
	    ()
	}
    } grep { $_->{device} && ($_->{mntpoint} || $_->{real_mntpoint}) && $_->{type} } @$fstab;

    join('', map { $_->[1] } sort { $a->[0] cmp $b->[0] } @l), \@smb_credentials;
}

sub fstab_to_string {
    my ($all_hds, $prefix) = @_;
    my $fstab = [ fsedit::get_really_all_fstab($all_hds), @{$all_hds->{special}} ];
    my ($s, undef) = prepare_write_fstab($fstab, $prefix, 'keep_smb_credentials');
    $s;
}

sub write_fstab {
    my ($all_hds, $prefix) = @_;
    log::l("writing $prefix/etc/fstab");
    my $fstab = [ fsedit::get_really_all_fstab($all_hds), @{$all_hds->{special}} ];
    my ($s, $smb_credentials) = prepare_write_fstab($fstab, $prefix, '');
    output("$prefix/etc/fstab", $s);
    network::smb::save_credentials($_) foreach @$smb_credentials;
}

sub part2device {
    my ($prefix, $dev, $type) = @_;
    $dev eq 'none' || member($type, qw(nfs smbfs davfs)) ? 
      $dev : 
      do {
	  my $dir = $dev =~ m!^(/|LABEL=)! ? '' : '/dev/';
	  eval { devices::make("$prefix$dir$dev") };
	  "$dir$dev";
      };
}

sub auto_fs() {
    grep { chop; $_ && !/nodev/ } cat_("/etc/filesystems");
}

sub mount_options {
    my %non_defaults = (
			sync => 'async', noatime => 'atime', noauto => 'auto', ro => 'rw', 
			user => 'nouser', nodev => 'dev', noexec => 'exec', nosuid => 'suid',
		       );
    my @user_implies = qw(noexec nodev nosuid);
    \%non_defaults, \@user_implies;
}

# simple function
# use mount_options_unpack + mount_options_pack for advanced stuff
sub add_options(\$@) {
    my ($option, @options) = @_;
    my %l; @l{split(',', $$option), @options} = (); delete $l{defaults};
    $$option = join(',', keys %l) || "defaults";
}

sub mount_options_unpack {
    my ($part) = @_;
    my $packed_options = $part->{options};

    my ($non_defaults, $user_implies) = mount_options();

    my @auto_fs = auto_fs();
    my %per_fs = (
		  iso9660 => [ qw(unhide) ],
		  vfat => [ qw(umask=0) ],
		  ntfs => [ qw(umask=0) ],
		  nfs => [ qw(rsize=8192 wsize=8192) ],
		  smbfs => [ qw(username= password=) ],
		  davfs => [ qw(username= password= uid= gid=) ],
		  reiserfs => [ 'notail' ],
		 );
    push @{$per_fs{$_}}, 'usrquota', 'grpquota' foreach 'ext2', 'ext3', 'xfs';

    while (my ($fs, $l) = each %per_fs) {
	isThisFs($fs, $part) || $part->{type} eq 'auto' && member($fs, @auto_fs) or next;
	$non_defaults->{$_} = 1 foreach @$l;
    }

    $non_defaults->{encrypted} = 1 if !$part->{isFormatted} || isSwap($part);

    $non_defaults->{supermount} = 1 if member(type2fs($part), 'auto', @auto_fs);

    my $defaults = { reverse %$non_defaults };
    my %options = map { $_ => '' } keys %$non_defaults;
    my @unknown;
    foreach (split(",", $packed_options)) {
	if ($_ eq 'user') {
	    $options{$_} = 1 foreach ('user', @$user_implies);
	} elsif (exists $non_defaults->{$_}) {
	    $options{$_} = 1;
	} elsif ($defaults->{$_}) {
	    $options{$defaults->{$_}} = 0;
	} elsif (/(.*?=)(.*)/) {
	    $options{$1} = $2;
	} else {
	    push @unknown, $_;
	}
    }
    # merge those, for cleaner help
    $options{'rsize=8192,wsize=8192'} = delete $options{'rsize=8192'} && delete $options{'wsize=8192'}
      if exists $options{'rsize=8192'};

    my $unknown = join(",", @unknown);
    \%options, $unknown;
}

sub mount_options_pack_ {
    my ($part, $options, $unknown) = @_;

    my ($non_defaults, $user_implies) = mount_options();
    my @l;

    if (delete $options->{user}) {
	push @l, 'user';
	foreach (@$user_implies) {
	    if (!delete $options->{$_}) {
		# overriding
		$options->{$non_defaults->{$_}} = 1;
	    }
	}
    }
    push @l, map_each { if_($::b, $::a =~ /=$/ ? "$::a$::b" : $::a) } %$options;
    push @l, $unknown;

    join(",", uniq(grep { $_ } @l));
}
sub mount_options_pack {
    my ($part, $options, $unknown) = @_;
    $part->{options} = mount_options_pack_($part, $options, $unknown);
    noreturn();
}

sub mount_options_help {
    my %help = map { $_ => '' } @_;
    my %short = map { if_(/(.*?)=/, "$1=" => $_) } keys %help;

    foreach (split(':', $ENV{LANGUAGE}), '') {
	my $manpage = "/usr/share/man/$_/man8/mount.8.bz2";
	-e $manpage or next;

	my ($tp, $option);
	foreach (`bzip2 -dc $manpage`) {
	    my $prev_tp = $tp;
	    $tp = /^\.(TP|RE)/;
	    my ($s) = /^\.B (.*)/;
	    if ($prev_tp && $s eq '\-o' .. /X^/) {
		if (my $v = $prev_tp && $s =~ /^[a-z]/i .. $tp) {
		    if ($v == 1) {
			$s = $short{$s} || $s;
			$option = exists $help{$s} && !$help{$s} ? $s : '';
		    } elsif ($v !~ 'E0') {
			s/\\//g;
			s/\s*"(.*?)"\s*/$1/g if s/^\.BR\s+//;
			s/^\.B\s+//;
			$help{$option} .= $_ if $option;
		    }
		}        
	    }
	}
    }
    %help;
}

sub set_default_options {
    my ($part, $is_removable, $useSupermount, $security, $iocharset, $codepage) = @_;

    my ($options, $unknown) = mount_options_unpack($part);

    if ($is_removable) {
	$options->{supermount} = $useSupermount;
	$part->{type} = 'auto';
    }

    my $is_auto = isThisFs('auto', $part);

    if ($part->{media_type} eq 'cdrom') {
	$options->{ro} = 1;
    }

    if ($part->{media_type} eq 'fd') {
	# slow device so don't loose time, write now!
	$options->{sync} = 1;
    }

    if (isTrueFS($part)) {
	#- noatime on laptops (do not wake up the hd)
	#- Do  not  update  inode  access times on this
	#- file system (e.g, for faster access  on  the
	#- news spool to speed up news servers).
	$options->{noatime} = detect_devices::isLaptop();
    }
    if (isThisFs('nfs', $part)) {
	put_in_hash($options, { 
			       nosuid => 1, 'rsize=8192,wsize=8192' => 1, soft => 1,
			      });
    }
    if (isThisFs('smbfs', $part)) {
	add2hash($options, { 'username=' => '%' }) if !$options->{'credentials='};
    }
    if (isFat($part) || $is_auto) {

	put_in_hash($options, {
			       user => 1, noexec => 0,
			      }) if $is_removable;

	put_in_hash($options, {
			       'umask=0' => $security < 3, 'iocharset=' => $iocharset, 'codepage=' => $codepage,
			      });
    }
    if (isThisFs('ntfs', $part)) {
	put_in_hash($options, { ro => 1, 'umask=0' => $security < 3, 'iocharset=' => $iocharset });
    }
    if (isThisFs('iso9660', $part) || $is_auto) {
	put_in_hash($options, { user => 1, noexec => 0, 'iocharset=' => $iocharset });
    }
    if (isThisFs('reiserfs', $part)) {
	$options->{notail} = 1;
    } else {
	$options->{notail} = 0;
    }
    if (isLoopback($part) && !isSwap($part)) { #- no need for loop option for swap files
	$options->{loop} = 1;
    }

    # rationalize: no need for user
    if ($options->{autofs} || $options->{supermount}) {
	$options->{user} = 0;
    }

    # have noauto when we have user
    $options->{noauto} = 1 if $options->{user}; 

    if ($options->{user}) {
	# ensure security  (user_implies - noexec as noexec is not a security matter)
	$options->{$_} = 1 foreach 'nodev', 'nosuid';
    }

    mount_options_pack($part, $options, $unknown);
}

sub set_all_default_options {
    my ($all_hds, $useSupermount, $security, $iocharset, $codepage) = @_;

    my @removables = @{$all_hds->{raw_hds}};

    foreach my $part (fsedit::get_really_all_fstab($all_hds)) {
	set_default_options($part, member($part, @removables), $useSupermount, $security, $iocharset, $codepage);
    }
}

sub set_removable_mntpoints {
    my ($all_hds) = @_;

    my %names;
    foreach (@{$all_hds->{raw_hds}}) {
	my $name = detect_devices::suggest_mount_point($_) or next;
	
	my $s = ++$names{$name};
	$_->{mntpoint} ||= "/mnt/$name" . ($s == 1 ? '' : $s);
    }
}

sub get_raw_hds {
    my ($prefix, $all_hds) = @_;

    $all_hds->{raw_hds} = [ detect_devices::removables() ];
    get_major_minor(@{$all_hds->{raw_hds}});

    my @fstab = read_fstab($prefix, "/etc/fstab", 'keep_freq_passno');
    $all_hds->{nfss} = [ grep { isThisFs('nfs', $_) } @fstab ];
    $all_hds->{smbs} = [ grep { isThisFs('smbfs', $_) } @fstab ];
    $all_hds->{davs} = [ grep { isThisFs('davfs', $_) } @fstab ];
    $all_hds->{special} = [
       (grep { isThisFs('tmpfs', $_) } @fstab),
       { device => 'none', mntpoint => '/proc', type => 'proc' },
       { device => 'none', mntpoint => '/dev/pts', type => 'devpts', options => 'mode=0620' },
    ];
}

################################################################################
# formatting functions
################################################################################
sub disable_forced_fsck {
    my ($dev) = @_;
    run_program::run("tune2fs", "-c0", "-i0", devices::make($dev));
}

sub format_ext2($@) {
    #- mke2fs -b (1024|2048|4096) -c -i(1024 > 262144) -N (1 > 100000000) -m (0-100%) -L volume-label
    #- tune2fs
    my ($dev, @options) = @_;
    $dev =~ m,(rd|ida|cciss)/, and push @options, qw(-b 4096 -R stride=16); #- For RAID only.
    push @options, qw(-b 1024 -O none) if arch() =~ /alpha/;
    run_program::run('mke2fs', '-F', @options, devices::make($dev)) or die N("%s formatting of %s failed", "ext2", $dev);
    run_program::run('mke2fs', '-F', @options, devices::make($dev)) or die N("%s formatting of %s failed", grep { $_ eq '-j' } @options ? "ext3" : "ext2", $dev);
}
sub format_ext3 {
    my ($dev, @options) = @_;
    format_ext2($dev, "-j", @options);
    disable_forced_fsck($dev);
}
sub format_reiserfs {
    my ($dev, @options) = @_;
    #TODO add -h tea
    run_program::run("mkreiserfs", "-ff", @options, devices::make($dev)) or die N("%s formatting of %s failed", "reiserfs", $dev);
}
sub format_xfs {
    my ($dev, @options) = @_;
    run_program::run("mkfs.xfs", "-f", "-q", @options, devices::make($dev)) or die N("%s formatting of %s failed", "xfs", $dev);
}
sub format_jfs {
    my ($dev, @options) = @_;
    run_program::run("mkfs.jfs", "-f", @options, devices::make($dev)) or die N("%s formatting of %s failed", "jfs", $dev);
}
sub format_dos {
    my ($dev, @options) = @_;
    run_program::run("mkdosfs", @options, devices::make($dev)) or die N("%s formatting of %s failed", "dos", $dev);
}
sub format_hfs {
    my ($dev, @options) = @_;
    run_program::run("hformat", @options, devices::make($dev)) or die N("%s formatting of %s failed", "HFS", $dev);
}
sub real_format_part {
    my ($part) = @_;

    $part->{isFormatted} and return;

    my $dev = $part->{real_device} || $part->{device};

    my @options = $part->{toFormatCheck} ? "-c" : ();
    log::l("formatting device $dev (type ", type2name($part->{type}), ")");

    if (isExt2($part)) {
	push @options, "-F" if isLoopback($part);
	push @options, "-m", "0" if $part->{mntpoint} =~ m|^/home|;
	format_ext2($dev, @options);
    } elsif (isThisFs("ext3", $part)) {
	push @options, "-m", "0" if $part->{mntpoint} =~ m|^/home|;
        format_ext3($dev, @options);
    } elsif (isThisFs("reiserfs", $part)) {
        format_reiserfs($dev, @options, if_(c::kernel_version() =~ /^\Q2.2/, "-v", "1"));
    } elsif (isThisFs("xfs", $part)) {
        format_xfs($dev, @options);
    } elsif (isThisFs("jfs", $part)) {
        format_jfs($dev, @options);
    } elsif (isDos($part)) {
        format_dos($dev, @options);
    } elsif (isWin($part)) {
        format_dos($dev, @options, '-F', 32);
    } elsif (isThisFs('hfs', $part)) {
        format_hfs($dev, @options, '-l', "Untitled");
    } elsif (isAppleBootstrap($part)) {
        format_hfs($dev, @options, '-l', "bootstrap");
    } elsif (isSwap($part)) {
	my $check_blocks = grep { /^-c$/ } @options;
        swap::make($dev, $check_blocks);
    } else {
	die N("I don't know how to format %s in type %s", $part->{device}, type2name($part->{type}));
    }
    $part->{isFormatted} = 1;
}
sub format_part {
    my ($raids, $part, $prefix) = @_;
    if (isRAID($part)) {
	require raid;
	raid::format_part($raids, $part);
    } elsif (isLoopback($part)) {
	loopback::format_part($part, $prefix);
    } else {
	real_format_part($part);
    }
}

################################################################################
# mounting functions
################################################################################
sub set_loop {
    my ($part) = @_;
    if (!$part->{real_device}) {
	eval { modules::load('loop') };