Navigation Menu

Skip to content

Commit

Permalink
require MySQL root command.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 5, 2010
1 parent 762276c commit 042f881
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 10 additions & 4 deletions rpm/centos/mysql-groonga.spec.in
Expand Up @@ -57,12 +57,18 @@ rm $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/ha_groonga.a
rm -rf $RPM_BUILD_ROOT

%post
echo "INSTALL PLUGIN groonga SONAME 'ha_groonga.so';" | mysql -u root mysql
:
command="/usr/bin/mysql -u root -e \"INSTALL PLUGIN groonga SONAME 'ha_groonga.so'\""
echo $command
eval $command || \
(echo "run the following command to register groonga storage engine:"; \
echo " $command")

%postun
echo "INSTALL PLUGIN groonga SONAME 'ha_groonga.so';" | mysql -u root mysql
:
command="/usr/bin/mysql -u root -e \"UNINSTALL PLUGIN groonga\""
echo $command
eval $command || \
(echo "run the following command to unregister groonga storage engine:"; \
echo " $command")

%files
%defattr(-,root,root,-)
Expand Down
14 changes: 10 additions & 4 deletions rpm/fedora/mysql-groonga.spec.in
Expand Up @@ -46,12 +46,18 @@ rm $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/ha_groonga.a
rm -rf $RPM_BUILD_ROOT

%post
echo "INSTALL PLUGIN groonga SONAME 'ha_groonga.so';" | mysql -u root mysql
:
command="/usr/bin/mysql -u root -p -e \"INSTALL PLUGIN groonga SONAME 'ha_groonga.so'\""
echo $command
eval $command || \
(echo "run the following command to register groonga storage engine:"; \
echo " $command")

%postun
echo "INSTALL PLUGIN groonga SONAME 'ha_groonga.so';" | mysql -u root mysql
:
command="/usr/bin/mysql -u root -p -e \"UNINSTALL PLUGIN groonga\""
echo $command
eval $command || \
(echo "run the following command to unregister groonga storage engine:"; \
echo " $command")

%files
%defattr(-,root,root,-)
Expand Down

0 comments on commit 042f881

Please sign in to comment.