summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-12-17 11:36:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-12-17 11:36:46 +0000
commitb0ecc75d700b4a9500d1e13be125c9d48d42092e (patch)
tree4b9470ec0b317d26c1b61aae30cc7dfb75677258 /perl-install
parentf26c4abbc6209dfffca97c959a4b7376a8b1e989 (diff)
downloaddrakx-b0ecc75d700b4a9500d1e13be125c9d48d42092e.tar
drakx-b0ecc75d700b4a9500d1e13be125c9d48d42092e.tar.gz
drakx-b0ecc75d700b4a9500d1e13be125c9d48d42092e.tar.bz2
drakx-b0ecc75d700b4a9500d1e13be125c9d48d42092e.tar.xz
drakx-b0ecc75d700b4a9500d1e13be125c9d48d42092e.zip
clean_tmp now means using tmpfs
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm11
-rw-r--r--perl-install/bootloader.pm6
-rw-r--r--perl-install/fs.pm1
-rw-r--r--perl-install/install2.pm1
4 files changed, 11 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 80d82a4e4..6c6135c7a 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -147,6 +147,7 @@ sub setupBootloader {
my $bootloader = arch() =~ /sparc/ ? __("SILO") : arch() =~ /ppc/ ? __("Yaboot") : __("LILO with graphical menu");
my $profiles = bootloader::has_profiles($b);
my $memsize = bootloader::get_append($b, 'mem');
+ my $prev_clean_tmp = my $clean_tmp = grep { $_->{mntpoint} eq '/tmp' } @{$hds->{special}};
$b->{vga} ||= 'Normal';
if (arch !~ /ppc/) {
@@ -166,7 +167,7 @@ sub setupBootloader {
{ label => _("Password (again)"), val => \$b->{password2}, hidden => 1 },
{ label => _("Restrict command line options"), val => \$b->{restricted}, type => "bool", text => _("restrict") },
),
-{ label => _("Clean /tmp at each boot"), val => \$b->{CLEAN_TMP}, type => 'bool', advanced => 1 },
+{ label => _("Clean /tmp at each boot"), val => \$clean_tmp, type => 'bool', advanced => 1 },
{ label => _("Precise RAM size if needed (found %d MB)", availableRamMB()), val => \$memsize, advanced => 1 },
if_(detect_devices::isLaptop,
{ label => _("Enable multi profiles"), val => \$profiles, type => 'bool', advanced => 1 },
@@ -204,6 +205,14 @@ sub setupBootloader {
bootloader::set_profiles($b, $profiles);
bootloader::add_append($b, "mem", $memsize);
+
+ if ($prev_clean_tmp != $clean_tmp) {
+ if ($clean_tmp) {
+ push @{$hds->{special}}, { device => 'none', mntpoint => '/tmp', type => 'tmpfs' };
+ } else {
+ @{$hds->{special}} = grep { $_->{mntpoint} eq '/tmp' } @{$hds->{special}};
+ }
+ }
}
$ask_per_entries or return 1;
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 6134b491d..2241e61a9 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -335,8 +335,6 @@ wait %d seconds for default boot.
}
}
-
- add2hash_($lilo, { getVarsFromSh("$prefix/etc/sysconfig/system") }); #- for CLEAN_TMP
add2hash_($lilo, { memsize => $1 }) if cat_("/proc/cmdline") =~ /mem=(\S+)/;
if (my ($s, $port, $speed) = cat_("/proc/cmdline") =~ /console=(ttyS(\d),(\d+)\S*)/) {
log::l("serial console $s $port $speed");
@@ -996,10 +994,6 @@ sub install {
die _("You can't install the bootloader on a %s partition\n", partition_table::type2fs($p))
if isThisFs('xfs', $p);
}
- {
- my $f = "$prefix/etc/sysconfig/system";
- setVarsInSh($f, add2hash_({ CLEAN_TMP => $lilo->{CLEAN_TMP} }, { getVarsFromSh($f) }));
- }
$lilo->{keytable} = keytable($prefix, $lilo->{keytable});
if (exists $lilo->{methods}{grub}) {
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 4de3524c3..c0783d945 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -435,6 +435,7 @@ sub get_raw_hds {
$all_hds->{nfss} = [ grep { isNfs($_) } @fstab ];
$all_hds->{smbs} = [ grep { isThisFs('smbfs', $_) } @fstab ];
$all_hds->{special} = [
+ (grep { isThisFs('tmpfs', $_) } @fstab),
{ device => 'none', mntpoint => '/proc', type => 'proc' },
{ device => 'none', mntpoint => '/dev/pts', type => 'devpts', options => 'mode=0620' },
];
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 372bb9d32..1aa15d45b 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -232,7 +232,6 @@ sub miscellaneous {
addToBeDone {
setVarsInSh("$o->{prefix}/etc/sysconfig/system", {
- CLEAN_TMP => $o->{miscellaneous}{CLEAN_TMP},
CLASS => $::expert && 'expert' || 'beginner',
SECURITY => $o->{security},
META_CLASS => $o->{meta_class} || 'PowerPack',