summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-11-09 20:38:25 +0000
committerFrancois Pons <fpons@mandriva.com>1999-11-09 20:38:25 +0000
commitd92b13883fbf6acce6c39cb76484accc56bce0c3 (patch)
treecfc9c50359dca43fb7169bdae397b1208b329f79 /perl-install
parenteb53575902c0282896e92d7d6d76a89bca420e5a (diff)
downloaddrakx-backup-do-not-use-d92b13883fbf6acce6c39cb76484accc56bce0c3.tar
drakx-backup-do-not-use-d92b13883fbf6acce6c39cb76484accc56bce0c3.tar.gz
drakx-backup-do-not-use-d92b13883fbf6acce6c39cb76484accc56bce0c3.tar.bz2
drakx-backup-do-not-use-d92b13883fbf6acce6c39cb76484accc56bce0c3.tar.xz
drakx-backup-do-not-use-d92b13883fbf6acce6c39cb76484accc56bce0c3.zip
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm11
-rw-r--r--perl-install/install_steps.pm13
-rw-r--r--perl-install/install_steps_interactive.pm41
-rw-r--r--perl-install/pkgs.pm4
4 files changed, 47 insertions, 22 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 8634f0343..1a81a238a 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -95,8 +95,8 @@ sub format_part($;$@) {
$part->{isFormatted} = 1;
}
-sub mount($$$;$$) {
- my ($dev, $where, $fs, $rdonly, $remount) = @_;
+sub mount($$$;$) {
+ my ($dev, $where, $fs, $rdonly) = @_;
log::l("mounting $dev on $where as type $fs");
-d $where or commands::mkdir_('-p', $where);
@@ -111,7 +111,6 @@ sub mount($$$;$$) {
my $flag = 0;#c::MS_MGC_VAL();
$flag |= c::MS_RDONLY() if $rdonly;
- $flag |= c::MS_REMOUNT() if $remount;
my $mount_opt = "";
if ($fs eq 'vfat') {
@@ -140,8 +139,8 @@ sub umount($) {
foreach (@mtab) { print F $_ unless /(^|\s)$mntpoint\s/; }
}
-sub mount_part($;$$$) {
- my ($part, $prefix, $rdonly, $remount) = @_;
+sub mount_part($;$$) {
+ my ($part, $prefix, $rdonly) = @_;
$part->{isMounted} and return;
@@ -149,7 +148,7 @@ sub mount_part($;$$$) {
swap::swapon($part->{device});
} else {
$part->{mntpoint} or die "missing mount point";
- mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly, $remount);
+ mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly);
}
$part->{isMounted} = $part->{isFormatted} = 1; #- assume that if mount works, partition is formatted
}
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 2f5de3dbc..8f3af44ef 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -246,7 +246,7 @@ sub configureNetwork($) {
install_any::pkg_install($o, "dhcpcd") if grep { $_->{BOOTPROTO} =~ /^(dhcp|bootp)$/ } @{$o->{intf}};
#-res_init(); #- reinit the resolver so DNS changes take affect
- pppConfig($o);
+ miscellaneousNetwork($o);
}
#------------------------------------------------------------------------------
@@ -297,6 +297,8 @@ sub pppConfig {
foreach ("$o->{prefix}/root", "$o->{prefix}/etc/skel") {
template2file("/usr/share/kppprc.in", "$_/.kde/share/config/kppprc", %toreplace) if -d "$_/.kde/share/config";
}
+
+ miscellaneousNetwork($o);
}
#------------------------------------------------------------------------------
@@ -474,6 +476,13 @@ sub setupXfree {
}
#------------------------------------------------------------------------------
+sub miscellaneousNetwork {
+ my ($o) = @_;
+ setVarsInSh ("$o->{prefix}/etc/profile.d/proxy.sh", $o->{miscellaneous}, qw(http_proxy ftp_proxy));
+ setVarsInCsh("$o->{prefix}/etc/profile.d/proxy.csh", $o->{miscellaneous}, qw(http_proxy ftp_proxy));
+}
+
+#------------------------------------------------------------------------------
sub miscellaneous {
my ($o) = @_;
setVarsInSh("$o->{prefix}/etc/sysconfig/system", {
@@ -482,8 +491,6 @@ sub miscellaneous {
TYPE => $o->{installClass},
SECURITY => $o->{security},
});
- setVarsInSh ("$o->{prefix}/etc/profile.d/proxy.sh", $o->{miscellaneous}, qw(http_proxy ftp_proxy));
- setVarsInCsh("$o->{prefix}/etc/profile.d/proxy.csh", $o->{miscellaneous}, qw(http_proxy ftp_proxy));
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 0e8571442..78c7c3ab1 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -245,7 +245,7 @@ sub configureNetwork($) {
my ($o, $first_time) = @_;
local $_;
if ($o->{intf} && $o->{netc}{NETWORKING} ne 'false') {
- if (!$::beginner && $first_time) {
+ if (!$::beginner && $first_time || $::expert) {
my @l = (
__("Keep the current IP configuration"),
__("Reconfigure network now"),
@@ -338,6 +338,8 @@ You may also enter the IP address of the gateway if you have one"),
[(map { \$netc->{$_}} qw(HOSTNAME dnsServer GATEWAY)),
{val => \$netc->{GATEWAYDEV}, list => \@devices}]
);
+
+ $o->miscellaneousNetwork();
}
#------------------------------------------------------------------------------
@@ -368,6 +370,8 @@ _("Domain name") => \$m->{domain},
_("First DNS Server") => \$m->{dns1},
_("Second DNS Server") => \$m->{dns2},
]);
+
+ $o->miscellaneousNetwork();
}
#------------------------------------------------------------------------------
@@ -604,7 +608,7 @@ _("Use NIS") => { val => \$o->{authentification}{NIS}, type => 'bool', text => _
if ($o->{authentification}{NIS}) {
$o->ask_from_entries_ref('',
- _("TODO"),
+ _("Authentification NIS"),
[ _("NIS Domain"), _("NIS Server") ],
[ \ ($o->{netc}{NISDOMAIN} ||= $o->{netc}{DOMAINNAME}),
{ val => \$o->{authentification}{NIS_server}, list => ["broadcast"] },
@@ -819,6 +823,27 @@ _("Default") => { val => \$default, type => 'bool' },
}
#------------------------------------------------------------------------------
+sub miscellaneousNetwork {
+ my ($o, $clicked) = @_;
+ my $u = $o->{miscellaneous} ||= {};
+
+ !$::beginner || $clicked and $o->ask_from_entries_ref('',
+ _("Proxies configuration"),
+ [ _("HTTP proxy"),
+ _("FTP proxy"),
+ ],
+ [ \$u->{http_proxy},
+ \$u->{ftp_proxy},
+ ],
+ complete => sub {
+ $u->{http_proxy} =~ m,^($|http://), or $o->ask_warn('', _("Proxy should be http://...")), return 1,3;
+ $u->{ftp_proxy} =~ m,^($|ftp://), or $o->ask_warn('', _("Proxy should be ftp://...")), return 1,4;
+ 0;
+ }
+ ) || return;
+}
+
+#------------------------------------------------------------------------------
sub miscellaneous {
my ($o, $clicked) = @_;
my %l = (
@@ -837,24 +862,18 @@ sub miscellaneous {
!$::beginner || $clicked and $o->ask_from_entries_ref('',
_("Miscellaneous questions"),
[ _("Do you have a laptop?"),
- _("Use hard drive optimizations"),
- _("Security level"),
- _("HTTP proxy"),
- _("FTP proxy"),
+ _("Use hard drive optimizations?"),
+ _("Choose security level"),
#-GOLD _("Use kudzu"),
- _("Precise ram size (found %d MB)", availableRam / 1024),
+ _("Precise ram size if needed (found %d MB)", availableRam / 1024),
],
[ { val => \$u->{LAPTOP}, type => 'bool' },
{ val => \$u->{HDPARM}, type => 'bool', text => _("(may cause disk problems)") },
{ val => \$s, list => [ map { $l{$_} } ikeys %l ] },
- \$u->{http_proxy},
- \$u->{ftp_proxy},
#-GOLD { val => \$u->{kudzu}, type => 'bool' },
\$u->{memsize},
],
complete => sub {
- $u->{http_proxy} =~ m,^($|http://), or $o->ask_warn('', _("Proxy should be http://...")), return 1,3;
- $u->{ftp_proxy} =~ m,^($|ftp://), or $o->ask_warn('', _("Proxy should be ftp://...")), return 1,4;
!$u->{memsize} || $u->{memsize} =~ s/^(\d+)M?$/$1M/i or $o->ask_warn('', _("Give the ram size in Mb")), return 1;
0;
}
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index cb12fdb8d..0179bf45d 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -300,7 +300,7 @@ sub init_db {
my ($prefix, $isUpgrade) = @_;
my $f = "$prefix/root/install.log";
-# open(LOG, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
+ open(LOG, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
*LOG or *LOG = log::F() or *LOG = *STDERR;
CORE::select((CORE::select(LOG), $| = 1)[0]);
c::rpmErrorSetCallback(fileno LOG);
@@ -315,7 +315,7 @@ sub init_db {
sub done_db {
log::l("closing install.log file");
- # close LOG;
+ close LOG;
}
sub getHeader($) {