diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-12-20 13:35:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-12-20 13:35:35 +0000 |
commit | 76f575f3c7fec164b849e21ea00de28792c9350f (patch) | |
tree | beee9071e22ebf21fc9002e141c2305b36c593bd | |
parent | 7234d1b90c3a62740cf89931341cfb2d04ded1c0 (diff) | |
download | drakx-backup-do-not-use-76f575f3c7fec164b849e21ea00de28792c9350f.tar drakx-backup-do-not-use-76f575f3c7fec164b849e21ea00de28792c9350f.tar.gz drakx-backup-do-not-use-76f575f3c7fec164b849e21ea00de28792c9350f.tar.bz2 drakx-backup-do-not-use-76f575f3c7fec164b849e21ea00de28792c9350f.tar.xz drakx-backup-do-not-use-76f575f3c7fec164b849e21ea00de28792c9350f.zip |
(get_user_home) do not horribly die if USER environment variable list
a non existing user
-rw-r--r-- | perl-install/network/modem.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 871019159..c60e1db77 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -18,7 +18,8 @@ sub get_user_home() { my $home; if ($ENV{USER} ne "root") { #- kdesu case - $home = (find { $_->[0] eq $ENV{USER} } list_passwd())->[7]; + my $user = find { $_->[0] eq $ENV{USER} } list_passwd(); + $home = $user->[7] if $user; } $home ||= $ENV{HOME}; #- consolehelper case $home; |