Последняя активность 6 months ago

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 2 insertions

jessie2stretch.sh

@@ -114,6 +114,8 @@ systemctl enable shorewall
114 114 # full-upgrade
115 115 apt-get dist-upgrade
116 116
117 + # Migrate php5 packages over to php meta packages
118 + apt install $(dpkg -l |grep php5 | awk '/^i/ { print $2 }' |grep -v ^php5$ |sed s/php5/php/)
117 119 # Fix IfModule mod_php5 in apache2 vHosts
118 120 sed -i "s/IfModule mod_php5/IfModule mod_php/g" /etc/apache2/sites-available/*
119 121 a2dismod php5; a2enmod php7.0 && systemctl restart apache2

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 5 insertions

jessie2stretch.sh

@@ -91,6 +91,11 @@ cat >> $CFG <<EOF
91 91
92 92 EOF
93 93
94 + # dnsmasq config dir
95 + if [ -f /etc/dnsmasq.conf.dpkg-new ]; then CFG=/etc/dnsmasq.conf.dpkg-new; \
96 + else CFG=/etc/dnsmasq.conf; fi
97 + sed -i "s%^#conf-dir=/etc/dnsmasq.d/%conf-dir=/etc/dnsmasq.d/%" $CFG
98 +
94 99 ## phpmyadmin
95 100 if [ -f /etc/phpmyadmin/config.inc.php.dpkg-new ]; then CFG=/etc/phpmyadmin/config.inc.php.dpkg-new; \
96 101 else CFG=/etc/phpmyadmin/config.inc.php; fi

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 1 insertion, 1 deletion

jessie2stretch.sh

@@ -99,7 +99,7 @@ sed -i "s#//\$cfg\['Servers'\]\[\$i\]\['auth_type'\] = 'http';#\$cfg['Servers'][
99 99
100 100 # Move configs from MySQl to MariaDB config location (e.g.)
101 101 mv /etc/mysql/conf.d/bind.cnf /etc/mysql/mariadb.conf.d/90-bind.cnf
102 - # In some cases the upgrade of databases seems not work out
102 + # In some cases the upgrade of databases seems not work out (problems with mysql.proc)
103 103 mysql_upgrade -f -p
104 104
105 105 # maybe we want to change some shorewall config stuff again

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 2 insertions, 2 deletions

jessie2stretch.sh

@@ -31,7 +31,7 @@ sed -i s/jessie/stretch/g /etc/apt/preferences*
31 31 sed -i s/jessie/stretch/g /etc/apt/sources.list.d/*jessie*
32 32 rename s/jessie/stretch/g /etc/apt/sources.list.d/*jessie*
33 33 rgrep jessie /etc/apt/sources.list*
34 - aptitude update
34 + apt-get update
35 35
36 36 # check package status
37 37 dpkg --audit
@@ -148,7 +148,7 @@ apt purge $(dpkg -l | grep lenny | grep -v xen | awk '/^rc/ { print $2 }') && \
148 148 apt purge $(dpkg -l | grep -E 'deb6|squeeze' | grep -v xen | awk '/^rc/ { print $2 }') && \
149 149 apt purge $(dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v -E 'linux-image|mailscanner|openswan|debian-security-support' | awk '/^rc/ { print $2 }') && \
150 150 apt purge $(dpkg -l | grep -E 'deb8|jessie' | grep -v xen | grep -v -E 'linux-image|debian-security-support' | awk '{ print $2 }') && \
151 - aptitude -y install deborphan && apt purge $(deborphan | grep -v xen | grep -v libpam-cracklib | awk '/^rc/ { print $2 }')
151 + apt -y install deborphan && apt purge $(deborphan | grep -v xen | grep -v libpam-cracklib | awk '/^rc/ { print $2 }')
152 152 apt purge $(dpkg -l | awk '/^rc/ { print $2 }')
153 153
154 154 # for the brave YoloOps crowd

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 1 insertion, 1 deletion

jessie2stretch.sh

@@ -7,7 +7,7 @@ dpkg-reconfigure locales
7 7 # remove unused config file
8 8 rm -rf /etc/network/options /etc/environment
9 9
10 - # migrate over to systemd (before the upgrade)
10 + # migrate over to systemd (before the upgrade) / you might want reboot if you install systemd
11 11 aptitude install systemd systemd-sysv
12 12
13 13 # are there 3rd party packages installed? (https://www.debian.org/releases/stretch/amd64/release-notes/ch-upgrading.de.html#system-status)

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 4 insertions, 1 deletion

jessie2stretch.sh

@@ -110,13 +110,16 @@ systemctl enable shorewall
110 110 apt-get dist-upgrade
111 111
112 112 # Fix IfModule mod_php5 in apache2 vHosts
113 - sed -i "s/IfModule mod_php5/IfModule mod_php7/g" /etc/apache2/sites-available/*
113 + sed -i "s/IfModule mod_php5/IfModule mod_php/g" /etc/apache2/sites-available/*
114 114 a2dismod php5; a2enmod php7.0 && systemctl restart apache2
115 115
116 116 # Fix our ssh pub key package configuration
117 117 [ -x /var/lib/dpkg/info/config-openssh-server-authorizedkeys-core.postinst ] && \
118 118 /var/lib/dpkg/info/config-openssh-server-authorizedkeys-core.postinst configure
119 119
120 + # snmpd now runs as Debian-snmp user, fixing sudo config
121 + sed -i s/snmp/Debian-snmp/ /etc/sudoers.d/*
122 +
120 123 # Upgrade postgres
121 124 # See also https://www.debian.org/releases/stretch/amd64/release-notes/ch-information.de.html#plperl
122 125 if [ "$(dpkg -l | grep "postgresql-9.4" | awk {'print $2'})" = "postgresql-9.4" ]; then \

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 2 insertions

jessie2stretch.sh

@@ -99,6 +99,8 @@ sed -i "s#//\$cfg\['Servers'\]\[\$i\]\['auth_type'\] = 'http';#\$cfg['Servers'][
99 99
100 100 # Move configs from MySQl to MariaDB config location (e.g.)
101 101 mv /etc/mysql/conf.d/bind.cnf /etc/mysql/mariadb.conf.d/90-bind.cnf
102 + # In some cases the upgrade of databases seems not work out
103 + mysql_upgrade -f -p
102 104
103 105 # maybe we want to change some shorewall config stuff again
104 106 # shorewall needs to be enabled via systemctl, /etc/default is not used by systemd

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 1 insertion

jessie2stretch.sh

@@ -109,6 +109,7 @@ apt-get dist-upgrade
109 109
110 110 # Fix IfModule mod_php5 in apache2 vHosts
111 111 sed -i "s/IfModule mod_php5/IfModule mod_php7/g" /etc/apache2/sites-available/*
112 + a2dismod php5; a2enmod php7.0 && systemctl restart apache2
112 113
113 114 # Fix our ssh pub key package configuration
114 115 [ -x /var/lib/dpkg/info/config-openssh-server-authorizedkeys-core.postinst ] && \

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 1 insertion

jessie2stretch.sh

@@ -135,6 +135,7 @@ pg_dropcluster 9.4 main
135 135 # remove old squeeze packages left around (keep eyes open!)
136 136 apt autoremove && \
137 137 apt purge $(dpkg -l | awk '/gcc-4.9/ { print $2 }') && \
138 + apt purge $(aptitude search ?obsolete | grep -v linux-image | awk '/^i *A/ { print $3 }') && \
138 139 apt purge $(aptitude search ?obsolete | grep -v linux-image | awk '/^i/ { print $2 }') && \
139 140 apt purge $(dpkg -l | grep etch | grep -v xen | grep -v unbound | grep -v finch | awk '/^rc/ { print $2 }') && \
140 141 apt purge $(dpkg -l | grep lenny | grep -v xen | awk '/^rc/ { print $2 }') && \

Jan Wagner ревизий этого фрагмента 8 years ago. К ревизии

1 file changed, 4 insertions, 4 deletions

jessie2stretch.sh

@@ -10,10 +10,6 @@ rm -rf /etc/network/options /etc/environment
10 10 # migrate over to systemd (before the upgrade)
11 11 aptitude install systemd systemd-sysv
12 12
13 - # Disable loading defaults.vim
14 - echo '" disable the loading of defaults.vim' >> /etc/vim/vimrc.local
15 - echo "let g:skip_defaults_vim = 1" >> /etc/vim/vimrc.local
16 -
17 13 # are there 3rd party packages installed? (https://www.debian.org/releases/stretch/amd64/release-notes/ch-upgrading.de.html#system-status)
18 14 aptitude search '~i(!~ODebian)'
19 15
@@ -61,6 +57,10 @@ libc6 libraries/restart-without-asking boolean true
61 57 EOF
62 58 /usr/bin/debconf-set-selections /tmp/stretch.preseed
63 59
60 + # Disable loading defaults.vim
61 + echo '" disable the loading of defaults.vim' >> /etc/vim/vimrc.local
62 + echo "let g:skip_defaults_vim = 1" >> /etc/vim/vimrc.local
63 +
64 64 # update aptitude first
65 65 [ "$(which aptitude)" = "/usr/bin/aptitude" ] && aptitude install aptitude
66 66