Commit f3a2750a authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Make sure the one-way migration question is always asked when preinstall runs

parent 8d747c5f
...@@ -5,6 +5,7 @@ mariadb-5.5 (5.5.39-2) unstable; urgency=low ...@@ -5,6 +5,7 @@ mariadb-5.5 (5.5.39-2) unstable; urgency=low
* Re-introduced tha HPPA build patch as the upstream fix wasn't complete * Re-introduced tha HPPA build patch as the upstream fix wasn't complete
* Fixed all kFreeBSD build and test suite issues * Fixed all kFreeBSD build and test suite issues
* Added Italian translation (Closes: #759813) * Added Italian translation (Closes: #759813)
* Set migration option as unseen if installation was aborted (Closes: #761452)
-- Otto Kekäläinen <otto@seravo.fi> Wed, 27 Aug 2014 21:12:36 +0300 -- Otto Kekäläinen <otto@seravo.fi> Wed, 27 Aug 2014 21:12:36 +0300
......
...@@ -33,13 +33,13 @@ stop_server() { ...@@ -33,13 +33,13 @@ stop_server() {
$cmd $cmd
errno=$? errno=$?
set -e set -e
# 0=ok, 100=no init script (fresh install) # 0=ok, 100=no init script (fresh install)
if [ "$errno" != 0 -a "$errno" != 100 ]; then if [ "$errno" != 0 -a "$errno" != 100 ]; then
echo "${cmd/ */} returned $errno" 1>&2 echo "${cmd/ */} returned $errno" 1>&2
echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2 echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
echo "Stop it yourself and try again!" 1>&2 echo "Stop it yourself and try again!" 1>&2
db_stop db_stop
exit 1 exit 1
fi fi
} }
...@@ -53,6 +53,7 @@ if [ -d $DATADIR ]; then ...@@ -53,6 +53,7 @@ if [ -d $DATADIR ]; then
db_get mariadb-server/oneway_migration || true db_get mariadb-server/oneway_migration || true
if [ "$RET" = "false" ]; then if [ "$RET" = "false" ]; then
echo "Aborting MariaDB installation." 1>&2 echo "Aborting MariaDB installation." 1>&2
db_fset mariadb-server/oneway_migration seen false || true
db_stop db_stop
exit 1 exit 1
fi fi
...@@ -69,9 +70,6 @@ if egrep -qi -r '^[^#]*ndb.connectstring|^[[:space:]]*\[[[:space:]]*ndb_mgmd' /e ...@@ -69,9 +70,6 @@ if egrep -qi -r '^[^#]*ndb.connectstring|^[[:space:]]*\[[[:space:]]*ndb_mgmd' /e
exit 1 exit 1
fi fi
# Abort if skip-bdb option is enabled, required for 5.0 -> 5.1 upgrades.
#TODO
# Safe the user from stupidities. # Safe the user from stupidities.
show_downgrade_warning=0 show_downgrade_warning=0
for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do
...@@ -88,7 +86,6 @@ if [ "$show_downgrade_warning" = 1 ]; then ...@@ -88,7 +86,6 @@ if [ "$show_downgrade_warning" = 1 ]; then
db_get mariadb-server-5.5/really_downgrade || true db_get mariadb-server-5.5/really_downgrade || true
if [ "$RET" = "true" ]; then if [ "$RET" = "true" ]; then
rm -f $DATADIR/debian-*.flag rm -f $DATADIR/debian-*.flag
touch $DATADIR/debian-5.5.flag
else else
echo "Aborting downgrade from (at least) $found_version to 5.5." 1>&2 echo "Aborting downgrade from (at least) $found_version to 5.5." 1>&2
echo "If are sure you want to downgrade to 5.5, remove the file" 1>&2 echo "If are sure you want to downgrade to 5.5, remove the file" 1>&2
...@@ -112,7 +109,7 @@ fi ...@@ -112,7 +109,7 @@ fi
# Now we have to ensure the following state: # Now we have to ensure the following state:
# /etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false # /etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false
# /etc/group: mysql:x:101: # /etc/group: mysql:x:101:
# #
# Sadly there could any state be present on the system so we have to # Sadly there could any state be present on the system so we have to
# modify everything carefully i.e. not doing a chown before creating # modify everything carefully i.e. not doing a chown before creating
# the user etc... # the user etc...
...@@ -163,7 +160,7 @@ if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4 ...@@ -163,7 +160,7 @@ if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4
fi fi
# Since the home directory was created before putting the user into # Since the home directory was created before putting the user into
# the mysql group and moreover we cannot guarantee that the # the mysql group and moreover we cannot guarantee that the
# permissions were correctly *before* calling this script, we fix them now. # permissions were correctly *before* calling this script, we fix them now.
# In case we use NIS and no mysql user is present then this script should # In case we use NIS and no mysql user is present then this script should
# better fail now than later.. # better fail now than later..
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment