summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-02-23 13:06:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-02-23 13:06:49 +0000
commit7461e6812b014dfdaad0f88f19e8fa49c6a32132 (patch)
treef121a60c968b9766118835f11450c3d0a2b6b0e1
parent1c62bb7e90a64f75803edb21f7dc074c870f17d4 (diff)
downloaddrakx-backup-do-not-use-7461e6812b014dfdaad0f88f19e8fa49c6a32132.tar
drakx-backup-do-not-use-7461e6812b014dfdaad0f88f19e8fa49c6a32132.tar.gz
drakx-backup-do-not-use-7461e6812b014dfdaad0f88f19e8fa49c6a32132.tar.bz2
drakx-backup-do-not-use-7461e6812b014dfdaad0f88f19e8fa49c6a32132.tar.xz
drakx-backup-do-not-use-7461e6812b014dfdaad0f88f19e8fa49c6a32132.zip
(vnew): use /usr/X11R6/bin/xtest instead of c::Xtest
-rw-r--r--perl-install/interactive.pm24
1 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 8754970c6..7121689f0 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -57,23 +57,23 @@ sub vnew {
my ($type, $su) = @_;
$su = $su eq "su";
require c;
- if ($ENV{DISPLAY} && c::Xtest($ENV{DISPLAY})) {
+ if ($ENV{DISPLAY} && system('/usr/X11R6/bin/xtest', '') == 0) {
if ($su) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
$> and exec "kdesu", "-c", "$0 @ARGV";
}
- require interactive_gtk;
- interactive_gtk->new;
- } else {
- if ($su && $>) {
- die "you must be root to run this program";
- }
- require 'log.pm';
- undef *log::l;
- *log::l = sub {}; # otherwise, it will bother us :(
- require interactive_newt;
- interactive_newt->new;
+ eval { require interactive_gtk };
+ !$@ and return interactive_gtk->new;
+ }
+
+ if ($su && $>) {
+ die "you must be root to run this program";
}
+ require 'log.pm';
+ undef *log::l;
+ *log::l = sub {}; # otherwise, it will bother us :(
+ require interactive_newt;
+ interactive_newt->new;
}
sub enter_console {}