Michal Hrusecky (old before rename to _miska_) 2010-09-29 10:48:13 +00:00 committed by Git OBS Bridge
parent e98a7596d7
commit a4034f8aba

View File

@ -280,12 +280,12 @@ else
# prepare tmp dir # prepare tmp dir
if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \ if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then [ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
rm -rf "$TMPDIR" rm -rf "$TMPDIR"
fi fi
TMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`" TMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`"
[ -z "$TMPDIR" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$TMPDIR" [ -z "$TMPDIR" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$TMPDIR"
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { [ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
echo "Can't create secure $TMPDIR" echo "Can't create secure $TMPDIR"
rc_failed; rc_status -v; rc_exit; rc_failed; rc_status -v; rc_exit;
} }
@ -379,7 +379,7 @@ else
fi fi
protected="`mktemp -d -p /var/tmp mysql-protected.XXXXXX | tee /var/run/mysql/protecteddir`" protected="`mktemp -d -p /var/tmp mysql-protected.XXXXXX | tee /var/run/mysql/protecteddir`"
[ -z "$protected" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$protected" [ -z "$protected" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$protected"
[ "`ls -ld "$protected" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { [ "`ls -ld "$protected" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
echo "Can't create secure $protected" | tee -a "$log_upgrade" echo "Can't create secure $protected" | tee -a "$log_upgrade"
rc_failed; rc_status -v; rc_exit; rc_failed; rc_status -v; rc_exit;
} }
@ -444,7 +444,7 @@ else
echo -n "Shutting down service MySQL " echo -n "Shutting down service MySQL "
kill_mysql kill_mysql
if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \ if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then [ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
rm -rf "$TMPDIR" rm -rf "$TMPDIR"
fi fi
# Remember status and be verbose # Remember status and be verbose