X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=61ca1dba750169d11f065b5b97ca889dcc03cdf4;hb=5513f3ac0ddee35f53b267e355eb0e603345ff22;hp=994f765209d707d153c60686021feb6c6382b77b;hpb=24ef90a0357f00ca2eeafe398c1de5d55e369509;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 994f765..61ca1db 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -367,7 +367,7 @@ check_upgrade () { if [ "$upgrade" ]; then notice " -Prije prelaska na Debian Wheezy potrebno je napraviti nadogradnju ovih paketa: +Prije prelaska na Debian stretch potrebno je napraviti nadogradnju ovih paketa: $upgrade Pokrenite: @@ -530,16 +530,18 @@ create_sources_list () { # backup old version if [ -f $sl -a ! -f $sl.$backup_ext ]; then - cp -av $sl $sl.$backup_ext + cp -v $sl $sl.$backup_ext fi # install new version - cp -av $sl_new $sl + cp -v $sl_new $sl notice "Novi sadrzaj datoteke /etc/apt/sources.list: `cat /etc/apt/sources.list`" fi + # make sure permissions are correct + chmod 0644 $sl rm $sl_new } @@ -869,7 +871,6 @@ pkgupgrade () { # upgrade apache2/php5 upgrade_apache2 () { pkgrm apache-common # prevents installation of apache2-suexec - pkgrm php5-suhosin # not available for wheezy pkgupgrade libapache2-mod-php5 php5-cli php5-cn apache2-cn \ php5-odbc mod-security-cn } @@ -884,19 +885,37 @@ upgrade_amavis () { fi done + # workaround for insserv complaining + if [ -x /sbin/insserv ]; then + if [ -r /etc/init.d/amavis.amavisd-new ]; then + /sbin/insserv amavis.amavisd-new + fi + fi + # install new packages pkgadd amavisd-cn amavisd-new + # workaround for insserv complaining + if [ -x /sbin/insserv ]; then + if [ -r /etc/init.d/amavis.amavisd-new ]; then + /sbin/insserv amavis.amavisd-new + fi + fi + # start new packages - /etc/init.d/amavisd-cn restart + ### By zelja, nema vise amavisd-cn, vjerujemo systemd-u + ### /etc/init.d/amavisd-cn restart + /etc/init.d/amavis restart } -# handle mysql 5.0 to 5.1 upgrade +# handle mysql upgrade upgrade_mysql () { - if pkg mysql-server || pkg mysql-server-5.1; then - pkgadd mysql-server - dpkg -P mysql-server-5.1 - /etc/init.d/mysql restart + if pkg mysql-server || pkg mysql-server-5.5 || \ + pkg mariadb-server || pkg mariadb-server-10.0 + then + pkgadd default-mysql-server + dpkg -P mysql-server mysql-server-5.5 mariadb-server-10.0 + service mysql restart fi }