diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-07-24 22:39:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-07-24 22:39:28 +0000 |
commit | b60c0cb8f67d745626fec6f0c8540818f24e91a6 (patch) | |
tree | 783189547888703c391b1719cf9ceaacb1e1aa63 /perl-install/commands.pm | |
parent | 0a96d505550060312a1cd9a04a9ae9bf23ebdaa2 (diff) | |
download | drakx-b60c0cb8f67d745626fec6f0c8540818f24e91a6.tar drakx-b60c0cb8f67d745626fec6f0c8540818f24e91a6.tar.gz drakx-b60c0cb8f67d745626fec6f0c8540818f24e91a6.tar.bz2 drakx-b60c0cb8f67d745626fec6f0c8540818f24e91a6.tar.xz drakx-b60c0cb8f67d745626fec6f0c8540818f24e91a6.zip |
move to MDK::Common, bool->to_bool
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r-- | perl-install/commands.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm index 11155f593..2c9324fd5 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -14,7 +14,8 @@ use vars qw($printable_chars); #-###################################################################################### #- misc imports #-###################################################################################### -use common qw(:common :file :system :constant); +use MDK::Common::System; +use common; #-##################################################################################### #- Globals @@ -325,7 +326,7 @@ sub dd { sub head_tail { my ($h, $n) = getopts(\@_, qw(hn)); - $h || @_ < bool($n) and die "usage: $0 [-h] [-n lines] [<file>]\n"; + $h || @_ < to_bool($n) and die "usage: $0 [-h] [-n lines] [<file>]\n"; $n = $n ? shift : 10; local *F; @_ ? open(F, $_[0]) || die "error: can't open file $_[0]\n" : (*F = *STDIN); @@ -497,7 +498,7 @@ $dev, $size, $used, $free, $use, $mntpoint $h{$dev} = $mntpoint; } foreach $dev (sort keys %h) { - ($size, $free) = common::df($mntpoint = $h{$dev}); + ($size, $free) = MDK::Common::System::df($mntpoint = $h{$dev}); $size or next; $use = int (100 * ($size - $free) / $size); @@ -544,7 +545,7 @@ sub du { my $f; $f = sub { my ($e) = @_; my $s = (lstat($e))[12]; - $s += sum map { &$f($_) } glob_("$e/*") if !-l $e && -d $e; + $s += sum(map { &$f($_) } glob_("$e/*")) if !-l $e && -d $e; $s; }; print &$f($_) >> 1, "\t$_\n" foreach @_ ? @_ : glob_("*"); @@ -576,9 +577,9 @@ sub bug { mount devices::make(detect_devices::floppy()), "/fd0"; require install_any; - output "/fd0/report.bug", install_any::report_bug("/mnt"); #- no other way :-( + output("/fd0/report.bug", install_any::report_bug("/mnt")); #- no other way :-( umount "/fd0"; - sync; + sync(); } sub loadkeys { |