From d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f Mon Sep 17 00:00:00 2001 From: Stew Benedict Date: Fri, 21 May 2004 19:16:21 +0000 Subject: Some new perl_checker fixes. --- perl-install/standalone/drakbackup | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'perl-install/standalone/drakbackup') diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 351f363f3..08532c12f 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -225,14 +225,11 @@ sub get_tape_info() { @tape_devices = (); system("dmesg | grep 'st[0-9] at' > $info"); - local *INFO; - open INFO, $info or warn("Can't open $info\n"); - local $_; - while () { + my @info = cat_($info); + foreach (@info) { @line_data = split(/[ \t,]+/, $_); push @tape_devices, "/dev/" . $line_data[3]; } - close INFO; unlink($info); } @@ -2776,22 +2773,18 @@ sub restore_aff_result() { button_box_ok_only(); $central_widget = \$do_restore; $up_box->show_all; - } sub return_path { my ($username) = @_; my $usr; my $home_dir; - my $passwdfile = "/etc/passwd"; - local *PASSWD; - open(PASSWD, $passwdfile) or exit 1; - while (defined(my $line = )) { + my @passwords = cat_("/etc/passwd"); + foreach my $line (@passwords) { chomp($line); ($usr, $home_dir) = (split(/:/, $line))[0,5]; last if $usr eq $username; } - close(PASSWD); return $home_dir; } -- cgit v1.2.1