]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 511337: Make checksetup.pl properly throw a warning when it can't chmod/chown...
authormkanat%bugzilla.org <>
Wed, 19 Aug 2009 05:51:21 +0000 (05:51 +0000)
committermkanat%bugzilla.org <>
Wed, 19 Aug 2009 05:51:21 +0000 (05:51 +0000)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat

Bugzilla/Install/Filesystem.pm
template/en/default/setup/strings.txt.pl

index 4cbbd57cc2f43f4f0893955d18e64e2602a33029..fe9783805ddb72f1d7e8a9ecfa20f24145c8c329 100644 (file)
@@ -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 {
index 4d91da60d01c56915c6f254d987fdec2a56711c8..6766bac7894a353eb968dfaf8519aa05a7e34e70 100644 (file)
@@ -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      => <<EOT,
 YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database
 you use):