summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-27 19:07:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-27 19:07:39 +0000
commit7cbd70aa1989af49648687e0724092fe58f135b1 (patch)
tree520e8520937ba6bca236cc42add08c86db1076e0 /perl-install/standalone
parent132de14f4face2f38c1e85102ca710239831696b (diff)
downloaddrakx-7cbd70aa1989af49648687e0724092fe58f135b1.tar
drakx-7cbd70aa1989af49648687e0724092fe58f135b1.tar.gz
drakx-7cbd70aa1989af49648687e0724092fe58f135b1.tar.bz2
drakx-7cbd70aa1989af49648687e0724092fe58f135b1.tar.xz
drakx-7cbd70aa1989af49648687e0724092fe58f135b1.zip
allow removing device "non kudzu flagged" (for harddrake)
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakupdate_fstab7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab
index 73c308bda..112873ffb 100755
--- a/perl-install/standalone/drakupdate_fstab
+++ b/perl-install/standalone/drakupdate_fstab
@@ -31,10 +31,11 @@ $::isStandalone = 1; #- not using standalone.pm which generates too many logs fo
$::testing = $ARGV[0] eq '--test' && shift @ARGV;
$::auto = $ARGV[0] eq '--auto' && shift @ARGV;
+my $no_flag = $ARGV[0] eq '--no-flag' && shift @ARGV;
my ($raw_action, $device_name) = @ARGV;
my ($action) = $raw_action =~ /^--(add|del)/;
-@ARGV == 2 && $action or die "usage: drakupdate_fstab [--test] [--auto] [--add | --del] <device>\n";
+@ARGV == 2 && $action or die "usage: drakupdate_fstab [--test] [--auto] [--no-flag] [--add | --del] <device>\n";
main($action, $device_name);
@@ -84,7 +85,7 @@ sub set_options {
fs::set_default_options($part, 1, $use_supermount, $security, $iocharset, $codepage);
my ($options, $unknown) = fs::mount_options_unpack($part);
- $options->{kudzu} = 1;
+ $options->{kudzu} = 1 if !$no_flag;
fs::mount_options_pack($part, $options, $unknown);
}
@@ -142,7 +143,7 @@ sub main {
return;
}
foreach (@$existing_fstab_entries) {
- if ($_->{options} !~ /\bkudzu\b/) {
+ if (!$no_flag && $_->{options} !~ /\bkudzu\b/) {
print STDERR "Not a 'kudzu'-flagged entry\n" if $::testing;
return;
}