forked from pool/mariadb
Accepting request 89946 from home:bkutil:mysql_test
Fixes bnc#727706. Fixed .changes as requested. OBS-URL: https://build.opensuse.org/request/show/89946 OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=57
This commit is contained in:
parent
44ce241bbf
commit
b8c0292c1d
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 2 12:55:18 UTC 2011 - bkutil@suse.com
|
||||
|
||||
- Fix pretrans script in spec file to use RPM embedded LUA.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 18 14:26:19 CEST 2011 - mhrusecky@suse.cz
|
||||
|
||||
|
34
mariadb.spec
34
mariadb.spec
@ -444,24 +444,24 @@ done
|
||||
%preun
|
||||
#-------------------------------------------------------------------------------
|
||||
[ $1 = 1 ] || /usr/sbin/rcmysql stop
|
||||
%pretrans
|
||||
if [ -x /usr/sbin/rcmysql ]; then
|
||||
RESTART=""
|
||||
/usr/sbin/rcmysql status > /dev/null && RESTART="yes"
|
||||
/usr/sbin/rcmysql stop
|
||||
[ "$RESTART" ] && mkdir -p /var/run/mysql/restart
|
||||
fi
|
||||
dbfile=var/mysql/mysql/db.ISM
|
||||
olddir=var/mysql
|
||||
newdir=var/lib/mysql
|
||||
# Do the database files still belong to root (very old installation)?
|
||||
# Change ownerships
|
||||
if [ -O $dbfile ]
|
||||
then
|
||||
chown -Rv mysql:mysql var/mysql/
|
||||
fi
|
||||
%pretrans -p <lua>
|
||||
if posix.access("/usr/sbin/rcmysql", "x") then
|
||||
restart = os.execute("/usr/sbin/rcmysql status > /dev/null")
|
||||
os.execute("/usr/sbin/rcmysql stop")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
if restart == 0 then
|
||||
os.execute("/bin/mkdir -p /var/run/mysql/restart")
|
||||
end
|
||||
end
|
||||
|
||||
dbfile="var/mysql/mysql/db.ISM"
|
||||
olddir="var/mysql"
|
||||
newdir="var/lib/mysql"
|
||||
-- Do the database files still belong to root (very old installation)?
|
||||
-- Change ownerships
|
||||
if posix.stat(dbfile, "uid") == 0 then
|
||||
os.execute("/bin/chown -Rv mysql:mysql var/mysql/")
|
||||
end
|
||||
|
||||
%posttrans
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user