summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakupdate_fstab10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab
index 31775ca43..019d3cce7 100755
--- a/perl-install/standalone/drakupdate_fstab
+++ b/perl-install/standalone/drakupdate_fstab
@@ -34,6 +34,7 @@ log::l("drakupdate_fstab called with @ARGV\n");
$::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 $debug = $ARGV[0] eq '--debug' && shift @ARGV;
my ($raw_action, $device_name) = @ARGV;
my ($action) = $raw_action =~ /^--(add|del)/;
@@ -60,6 +61,10 @@ sub device_name_to_entry {
$name =~ s|/dev/||;
$name =~ /fd[01]/ && !$::auto and return { device => $name };
my @l = detect_devices::get();
+ if ($debug) {
+ require Data::Dumper;
+ output("/tmp/drakdump_devices-$action", Data::Dumper->Dump([ \@l ], [ qw($l) ]));
+ }
my $e;
if (my ($devfs_prefix, $nb) = $name =~ m,(.*)/(?:cd|disc|part(\d+))$,) {
@@ -130,6 +135,11 @@ sub main {
my $fstab = [ fs::read_fstab('', '/etc/fstab', 'keep_freq_passno', 'keep_devfs_name', 'verbatim_credentials') ];
my ($existing_fstab_entries, $fstab_) = partition { fsedit::is_same_hd($_, $part) } @$fstab;
+ if ($debug) {
+ require Data::Dumper;
+ output("/tmp/drakdump_entries-$action", Data::Dumper->Dump([ \@ARGV, $part, $fstab, $fstab_, $existing_fstab_entries ],
+ [ qw($ARGV $part $fstab $fstab_ $existing_fstab_entries) ]));
+ }
if ($action eq 'add') {
if (@$existing_fstab_entries) {
print STDERR "Already in fstab\n" if $::testing;