diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-21 15:09:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-21 15:09:43 +0000 |
commit | 104207a9c0af17d2fb4b0c510ec0d3de9cc04b4b (patch) | |
tree | 56c6f4db5e864dd2dbf715decc372e19e79646de | |
parent | f73cea963a17e12f46572736e614d8f1bda46279 (diff) | |
download | rpmdrake-104207a9c0af17d2fb4b0c510ec0d3de9cc04b4b.tar rpmdrake-104207a9c0af17d2fb4b0c510ec0d3de9cc04b4b.tar.gz rpmdrake-104207a9c0af17d2fb4b0c510ec0d3de9cc04b4b.tar.bz2 rpmdrake-104207a9c0af17d2fb4b0c510ec0d3de9cc04b4b.tar.xz rpmdrake-104207a9c0af17d2fb4b0c510ec0d3de9cc04b4b.zip |
handle root directory not being /root
-rw-r--r-- | rpmdrake.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index 1fa71386..429c328e 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -150,8 +150,8 @@ sub myexit { ugtk2::exit(undef, @_); } -$ENV{HOME} = '/root' if $> == 0; -$ENV{HOME} ||= '/root'; +my ($root) = grep { $_->[2] == 0 } list_passwd(); +$ENV{HOME} = $> == 0 ? $root->[7] : $ENV{HOME} || '/root'; our $configfile = "$ENV{HOME}/.rpmdrake"; our ($already_splashed, $changelog_first_config, $max_info_in_descr, $tree_flat, $tree_mode); |