From 7cbd70aa1989af49648687e0724092fe58f135b1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 27 Feb 2003 19:07:39 +0000 Subject: allow removing device "non kudzu flagged" (for harddrake) --- perl-install/standalone/drakupdate_fstab | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'perl-install/standalone') 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] \n"; +@ARGV == 2 && $action or die "usage: drakupdate_fstab [--test] [--auto] [--no-flag] [--add | --del] \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; } -- cgit v1.2.1