diff options
author | Stew Benedict <stewb@mandriva.org> | 2004-05-21 19:16:21 +0000 |
---|---|---|
committer | Stew Benedict <stewb@mandriva.org> | 2004-05-21 19:16:21 +0000 |
commit | d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f (patch) | |
tree | 4759b186e530cae4af16350e65d8bebad908dd00 /perl-install/standalone/drakbackup | |
parent | 63cc60760146cea0a89b5b3c59cbdb2abbd7679a (diff) | |
download | drakx-d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f.tar drakx-d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f.tar.gz drakx-d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f.tar.bz2 drakx-d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f.tar.xz drakx-d7fa5f19fa02b41e49c8138a0f9934ba1b8b5d5f.zip |
Some new perl_checker fixes.
Diffstat (limited to 'perl-install/standalone/drakbackup')
-rwxr-xr-x | perl-install/standalone/drakbackup | 15 |
1 files changed, 4 insertions, 11 deletions
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 (<INFO>) { + 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 = <PASSWD>)) { + 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; } |