From 474ef6367025b193d13a29f650cd5a1c920c2c91 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Fri, 2 Sep 2005 21:40:20 +0000 Subject: - Check for CUPS daemon running without console output. --- perl-install/printer/services.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/printer') diff --git a/perl-install/printer/services.pm b/perl-install/printer/services.pm index adb2587fe..f94cc5af5 100644 --- a/perl-install/printer/services.pm +++ b/perl-install/printer/services.pm @@ -45,7 +45,9 @@ sub wait_for_cups() { my $cupsready = 0; my $i; for ($i = 0; $i < 30; $i++) { - run_program::rooted($::prefix, "/usr/bin/lpstat", "-r"); + # Check whether CUPS is running without any console output + system(($::testing ? $::prefix : "chroot $::prefix/ ") . + "/usr/bin/lpstat -r >/dev/null 2>&1"); if (($? >> 8) != 0) { # CUPS is not ready, continue sleep 1; -- cgit v1.2.1