Skip to content

Instantly share code, notes, and snippets.

@riywo
Created November 11, 2012 22:51
Show Gist options
  • Select an option

  • Save riywo/4056602 to your computer and use it in GitHub Desktop.

Select an option

Save riywo/4056602 to your computer and use it in GitHub Desktop.
--- scripts/mysql_install_db.bak 2012-11-11 22:46:40.868877071 +0000
+++ scripts/mysql_install_db 2012-11-11 22:50:27.449095815 +0000
@@ -634,7 +634,7 @@
foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" )
{
mkdir($dir, 0700) unless -d $dir;
- chown($opt->{user}, $dir) if -w "/" and !$opt->{user};
+ system("chown $opt->{user} $dir") if -w "/" and $opt->{user};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment