From 6990f9fecf2642e7a876717091968d4f7872562c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 26 Jul 2002 16:51:29 +0000 Subject: cleanup launching qiv (using run_program) --- perl-install/Xconfigurator.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 22864b6f5..5e6fb981e 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -639,8 +639,10 @@ sub testFinalConfig { print F q{ require lang; use interactive::gtk; + use run_program; use my_gtk qw(:wrappers); + $::prefix = "} . $::$prefix . q{"; $::isStandalone = 1; lang::bindtextdomain(); @@ -661,8 +663,8 @@ sub testFinalConfig { my $background = "/usr/share/pixmaps/backgrounds/linux-mandrake/XFdrake-image-test.jpg"; my $qiv = "/usr/bin/qiv"; - -r "} . $::prefix . q{/$background" && -x "} . $::prefix . q{/$qiv" and - system(($::testing ? "} . $::prefix . q{" : "chroot } . $::prefix . q{/ ") . "$qiv -y $background"); + run_program::rooted($::prefix, $qiv, "-y", $background) + if -r "$::prefix/$background" && -x "$::prefix/$qiv"; my $in = interactive::gtk->new; $in->exit($in->ask_yesorno('', [ _("Is this the correct setting?"), $text ], 0) ? 0 : 222); -- cgit v1.2.1