summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-16 17:30:46 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-16 17:30:46 +0000
commit81068b4c188a82c0ae486665617f385997e619cd (patch)
tree485035ca8ecab31f9012e5b38c59c25434a0b676 /perl-install/commands.pm
parent1609027e73313dc16a5109e3d3f56d6b1c9b20ad (diff)
downloaddrakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar
drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar.gz
drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar.bz2
drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar.xz
drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.zip
no_comment
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 87862c19b..2ae11bf8e 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -41,7 +41,8 @@ sub lsmod { print "Module Size Used by\n"; cat("/proc/modules"
sub grep_ {
my ($h, $v) = getopts(\@_, qw(hv));
- my $r = shift and !$h or die "usage: grep <regexp> [files...]\n";
+ @_ == 0 || $h and die "usage: grep <regexp> [files...]\n";
+ my $r = shift;
@ARGV = @_; (/$r/ ? $v || print : $v && print) while <>
}
@@ -57,13 +58,17 @@ sub tr_ {
sub mount {
@_ or return cat("/proc/mounts");
my ($t) = getopts(\@_, qw(t));
- my $fs = $t ? shift : $_[0] =~ /:/ ? "nfs" : "ext2";
+ my $fs = $t && shift;
@_ == 2 or die "usage: mount [-t <fs>] <device> <dir>\n",
" (if /dev/ is left off the device name, a temporary node will be created)\n";
+ my ($dev, $where) = @_;
+ $fs ||= $where =~ /:/ ? "nfs" :
+ $dev =~ /fd/ ? "vfat" : "ext2";
+
require 'fs.pm';
- fs::mount(@_, $fs, 0, 1);
+ fs::mount($dev, $where, $fs, 0, 1);
}
sub umount {