]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- add user and group mysql with checking in files passwd, group
authorsmyda <smyda@ite.pl>
Wed, 9 Feb 2000 14:35:15 +0000 (14:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- mysql_install_db moving to mysql.init script
- fix polish summary

Changed files:
    mysql.spec -> 1.31

mysql.spec

index f189656aa37ec73c70c4f1eea50124f8f45ede39..2e02ebaa55f0e3cd3f4ec2038f9c2889edda6245 100644 (file)
@@ -2,7 +2,7 @@
 %define                __find_requires %{_builddir}/mysql-%{version}/find-perl-requires
 Summary:       MySQL: a very fast and reliable SQL database engine
 Summary(fr):   MySQL: un serveur SQL rapide et fiable
-Summary(pl):   MySQL: bardzo szybki i niezawodna baza danych (SQL)
+Summary(pl):   MySQL: bardzo szybka i niezawodna baza danych (SQL)
 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
 Name:           mysql
 Group:         Applications/Databases
@@ -213,7 +213,7 @@ export LDFLAGS CXXFLAGS
        --with-mysqld-user=mysql \
        --with-unix-socket-path=/var/state/mysql/mysql.sock \
        --with-comment='Polish Linux Distribution MySQL RPM' \
-       --without-readline \
+       --with-readline \
        --with-low-memory
        
 # If you have much RAM you can remove --with-low-memory
@@ -244,26 +244,30 @@ strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*.*
 gzip -9nf $RPM_BUILD_ROOT{%{_mandir}/man1/*,%{_infodir}/mysql.info*}
 
 %pre
-echo "Creating system group mysql with GID 89"
-/usr/sbin/groupadd -f -g 89 mysql
-echo "Creating system user mysql with UID 89"
-/usr/sbin/useradd -u 89 -g mysql -d /var/state/mysql -s /bin/sh mysql > /dev/null
+grep -l mysql /etc/group &>/dev/null || (
+    echo "Creating system group mysql with GID 89"
+    /usr/sbin/groupadd -f -g 89 mysql
+)
+grep -l mysql /etc/passwd &>/dev/null || (
+    echo "Creating system user mysql with UID 89"
+    /usr/sbin/useradd -u 89 -g mysql -d /var/state/mysql -s /bin/sh mysql > /dev/null
+)
 
 %post
 /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+/sbin/chkconfig --add mysql
 
-TMP=/tmp TMPDIR=/tmp mysql_install_db
-# -IN-RPM
-chown -R mysql /var/state/mysql
+%preun
+if [ "$1" = "0" ]; then
+    if [ -f /var/lock/subsys/mysql ]; then
+       /etc/rc.d/init.d/mysql stop
+    fi
+    /sbin/chkconfig --del mysql
+fi
 
 %postun
 /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
 
-echo Removing user mysql
-/usr/sbin/userdel mysql
-echo Removing group mysql
-/usr/sbin/groupdel mysql
-
 %post   libs -p /sbin/ldconfig
 %postun libs -p /sbin/ldconfig
 
This page took 0.060515 seconds and 4 git commands to generate.