summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 22:52:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 22:52:57 +0000
commit8cb21146557a468e517db3123d481e5715971c7a (patch)
tree757b85c18f3a46f1ce331891e7f7aaf98a8b6702 /perl-install/commands.pm
parentd3271db5a1609ee14b6f3a57aed7925644a5dabe (diff)
downloaddrakx-8cb21146557a468e517db3123d481e5715971c7a.tar
drakx-8cb21146557a468e517db3123d481e5715971c7a.tar.gz
drakx-8cb21146557a468e517db3123d481e5715971c7a.tar.bz2
drakx-8cb21146557a468e517db3123d481e5715971c7a.tar.xz
drakx-8cb21146557a468e517db3123d481e5715971c7a.zip
- have "local *FILEHANDLE" before each "open FILEHANDLE, ..."
- use some "cat_" and "output" where possible
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 3808d6848..be82a2020 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -235,6 +235,7 @@ sub ps {
require c;
my $page = c::getpagesize() / 1024;
+ local *PS;
open PS, ">&STDOUT";
format PS_TOP =
PID RSS %CPU CMD
@@ -426,7 +427,7 @@ sub route {
my ($titles, @l) = cat_("/proc/net/route");
my @titles = split ' ', $titles;
my %l;
- open ROUTE, ">&STDOUT";
+ open ROUTE, ">&STDOUT"; #-# ROUTE must be not be localised otherwise the "format ROUTE" fails
format ROUTE_TOP =
Destination Gateway Mask Iface
.
@@ -447,6 +448,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";
format DF_TOP =
Filesystem Size Used Avail Use Mounted on