From 94a9aa6b6be9af54402364b4309e4136866537ad Mon Sep 17 00:00:00 2001 From: Stew Benedict Date: Fri, 30 Jul 2004 04:22:24 +0000 Subject: Fixes for AntHill #1009, #1010. --- perl-install/standalone/drakbackup | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 7f403a246..958f54cc5 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -257,8 +257,8 @@ sub get_free_space { sub check_storage_quota { my ($dir) = @_; - my $used = `du $dir`; - my $used_space = $used / 1024; + my $used = `du -b $dir`; + my $used_space = $used / 1024 / 1024; if ($used_space > $conf{MAX_SPACE}) { return $used_space; } else { @@ -740,9 +740,11 @@ sub check_for_cd() { show_warning("f", N("Does not appear to be recordable media!")); return 1; } - if ($log_buff =~ /Is not erasable/ && $conf{MEDIA_ERASE}) { - show_warning("f", N("Not erasable media!")); - return 1; + #- non-fatal, just disable erase + if (($log_buff =~ /Is not erasable/ || $log_buff =~ /Found DVD media/) && $conf{MEDIA_ERASE}) { + show_warning("w", N("Not erasable media!")); + $conf{MEDIA_ERASE} = 0; + save_conf_file(); } if ($conf{MULTI_SESSION}) { @@ -767,8 +769,8 @@ sub check_for_cd() { sub write_on_cd() { my $command = "cdrecord -v dev=$conf{CD_DEVICE} -data "; - # DVD+RW use -dao - $command .= "-dao " if $conf{DVDRW}; + # DVD+RW use -sao + $command .= "-sao " if $conf{DVDRW}; #- only blank if it's the first session $command .= "blank=fast " if $conf{MEDIA_ERASE} && $session_offset eq ''; #- multi-session mode -- cgit v1.2.1