From: mkanat%bugzilla.org <> Date: Wed, 19 Aug 2009 05:51:21 +0000 (+0000) Subject: Bug 511337: Make checksetup.pl properly throw a warning when it can't chmod/chown... X-Git-Tag: bugzilla-3.5.1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b04ef88ffb89c25db72bc0e8c5195468d2b00e1;p=thirdparty%2Fbugzilla.git Bug 511337: Make checksetup.pl properly throw a warning when it can't chmod/chown a file Patch by Max Kanat-Alexander (module owner) a=mkanat --- diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 4cbbd57cc2..fe9783805d 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -30,6 +30,7 @@ use strict; use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Install::Localconfig; +use Bugzilla::Install::Util qw(install_string); use Bugzilla::Util; use File::Find; @@ -600,10 +601,12 @@ sub _fix_cvs_dirs { sub _fix_perms { my ($name, $owner, $group, $perms) = @_; #printf ("Changing $name to %o\n", $perms); - chown $owner, $group, $name - || warn "Failed to change ownership of $name: $!"; + chown $owner, $group, $name + or warn install_string('chown_failed', { path => $name, + error => $! }) . "\n"; chmod $perms, $name - || warn "Failed to change permissions of $name: $!"; + or warn install_string('chmod_failed', { path => $name, + error => $! }) . "\n"; } sub _check_web_server_group { diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 4d91da60d0..6766bac789 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -33,6 +33,8 @@ checking_dbd => 'Checking available perl DBD modules...', checking_optional => 'The following Perl modules are optional:', checking_modules => 'Checking perl modules...', + chmod_failed => '##path##: Failed to change permissions: ##error##', + chown_failed => '##path##: Failed to change ownership: ##error##', commands_dbd => <