summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-28 12:46:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-28 12:46:13 +0000
commit9ecdd7859a7c4fb20a4610d65132e59461241920 (patch)
tree6785d1c7b91e3c01c3f2c54daccf525b228b6072 /perl-install/commands.pm
parent223f1039651720ff39360406dd098e223e0efd7a (diff)
downloaddrakx-9ecdd7859a7c4fb20a4610d65132e59461241920.tar
drakx-9ecdd7859a7c4fb20a4610d65132e59461241920.tar.gz
drakx-9ecdd7859a7c4fb20a4610d65132e59461241920.tar.bz2
drakx-9ecdd7859a7c4fb20a4610d65132e59461241920.tar.xz
drakx-9ecdd7859a7c4fb20a4610d65132e59461241920.zip
fix "ps" and "df" (were broken due to localization of *DF and *PS)
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 4d562a7ca..9d45e58a7 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -10,7 +10,7 @@ package commands; # $Id$
use diagnostics;
use strict;
-use vars qw($printable_chars *ROUTE);
+use vars qw($printable_chars *ROUTE *DF *PS);
#-######################################################################################
#- misc imports
@@ -237,8 +237,7 @@ sub ps {
require c;
my $page = c::getpagesize() / 1024;
- local *PS;
- open PS, ">&STDOUT";
+ open PS, ">&STDOUT"; #- PS must be not be localised otherwise the "format PS" fails
format PS_TOP =
PID RSS %CPU CMD
.
@@ -451,8 +450,7 @@ $l{Destination}, $l{Gateway}, $l{Mask}, $l{Iface}
sub df {
my ($h) = getopts(\@_, qw(h));
my ($dev, $size, $free, $used, $use, $mntpoint);
- local *DF;
- open DF, ">&STDOUT";
+ open DF, ">&STDOUT"; #- DF must be not be localised otherwise the "format DF" fails
format DF_TOP =
Filesystem Size Used Avail Use Mounted on
.