X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=52a5f7ac38db6dda313379977f3d440b9cde2399;hb=refs%2Ftags%2Fbuster%2F10.1.45%2Bcn10u1;hp=4bf896b068b74e0adae88afbf97b8aea08769d43;hpb=94ed0d871649e73400c860ae9b577d3c5b617800;p=mariadb-cn.git diff --git a/debian/postinst b/debian/postinst index 4bf896b..52a5f7a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -3,6 +3,7 @@ set -e [ "$1" = "configure" ] || exit 0 +[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx PKG="mysql-cn" @@ -10,7 +11,7 @@ PKG="mysql-cn" . /usr/share/carnet-tools/functions.sh if [ -f /etc/mysql/my.cnf ]; then - # ukljuci networking, da mysql visi na portu 3306 + # iskljuci zastarjelu opciju cp_check_and_sed '^skip-networking' \ 's/^skip-networking$/#skip-networking/' \ /etc/mysql/my.cnf && restart=yes || true @@ -25,13 +26,10 @@ if [ -f /etc/mysql/my.cnf ]; then "s,^\([\t ]*log[\t ]*=\),#\1," \ /etc/mysql/my.cnf && restart=yes || true - # ukljuci podrsku za hrvatsko znakovlje - if ! grep -q default-character-set /etc/mysql/my.cnf; then - awk '/^\[mysqld\]/{print "[mysqld]"; print "default-character-set=croat"; getline}{print $0}' \ - /etc/mysql/my.cnf > /etc/mysql/mysql-cn.$$ - cp_mv /etc/mysql/mysql-cn.$$ /etc/mysql/my.cnf - restart=yes - fi + # iskljuci zastarjeli skip-bdb + cp_check_and_sed '^skip-bdb' \ + 's/^skip-bdb$/#skip-bdb/' \ + /etc/mysql/my.cnf && restart=yes || true fi # pristup samo sa lokalne mreze, preko tcp-wrappera... @@ -50,7 +48,7 @@ if [ -z "$rootmycnf" ]; then if echo | mysql mysql 2> /dev/null; then mypwd="`makepasswd`" mysqladmin password $mypwd - cp_echo "CN: Password for MySQL administrator (root@localhost) is: $mypwd" + cp_echo "CN: Zaporka za MariaDB administratora (root@localhost) je: $mypwd" cp_mail $PKG fi fi @@ -58,14 +56,18 @@ fi if su - nobody -c '[ -r ~root/.my.cnf ]' 2>&1 > /dev/null; then if grep -q "password.*=" ~root/.my.cnf; then - echo "CN: WARNING: ~root/.my.cnf is world readable." + echo "CN: UPOZORENJE: datoteka ~root/.my.cnf je svima citljiva." fi fi [ "$restart" = "yes" ] || exit 0 # restart mysql-a -if [ -x /usr/sbin/invoke-rc.d ]; then - [ -x /etc/init.d/mysql ] && invoke-rc.d mysql restart -else - [ -x /etc/init.d/mysql ] && /etc/init.d/mysql restart -fi +#if [ -x /usr/sbin/invoke-rc.d ]; then +# [ -x /etc/init.d/mysql ] && invoke-rc.d mysql restart +#else +# [ -x /etc/init.d/mysql ] && /etc/init.d/mysql restart +#fi + +invoke-rc.d mysql restart + +#DEBHELPER#