]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- use %useradd/%groupadd macros
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 1 May 2005 17:31:30 +0000 (17:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql.spec -> 1.263

mysql.spec

index 41edb1bd5a67dd47aabd14a6cff9145f0ec9048c..24008696ef549539846194770264f929fc7fde27 100644 (file)
@@ -65,7 +65,7 @@ BuildRequires:        perl-DBI
 BuildRequires: perl-devel >= 1:5.6.1
 BuildRequires: readline-devel >= 4.2
 BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: texinfo
 BuildRequires: zlib-devel
 PreReq:                rc-scripts >= 0.2.0
@@ -540,24 +540,8 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid mysql`" ]; then
-       if [ "`/usr/bin/getgid mysql`" != "89" ]; then
-               echo "Error: group mysql doesn't have gid=89. Correct this before installing mysql." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 89 mysql
-fi
-if [ -n "`/bin/id -u mysql 2>/dev/null`" ]; then
-       if [ "`/bin/id -u mysql`" != "89" ]; then
-               echo "Error: user mysql doesn't have uid=89. Correct this before installing mysql." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 89 \
-                       -d %{_mysqlhome} -s /bin/sh -g mysql \
-                       -c "MySQL Server" mysql 1>&2
-fi
+%groupadd -g 89 mysql
+%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
 
 %post
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
This page took 0.113298 seconds and 4 git commands to generate.