Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 1 insertion
wheezy2jessie.sh
| @@ -32,6 +32,7 @@ dpkg --get-selections | grep hold | |||
| 32 | 32 | # unmark packages auto | |
| 33 | 33 | aptitude unmarkauto vim | |
| 34 | 34 | aptitude unmarkauto monitoring-plugins-standard monitoring-plugins-common monitoring-plugins-basic | |
| 35 | + | aptitude unmarkauto open-vm-tools-dkms ifenslave | |
| 35 | 36 | aptitude unmarkauto $(dpkg-query -W 'linux-image-3.2.*' | cut -f1) | |
| 36 | 37 | ||
| 37 | 38 | # have a look into required and free disk space | |
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 3 insertions, 2 deletions
wheezy2jessie.sh
| @@ -31,7 +31,7 @@ dpkg --get-selections | grep hold | |||
| 31 | 31 | ||
| 32 | 32 | # unmark packages auto | |
| 33 | 33 | aptitude unmarkauto vim | |
| 34 | - | aptitude unmarkauto monitoring-plugins-standard monitoring-plugins-basic | |
| 34 | + | aptitude unmarkauto monitoring-plugins-standard monitoring-plugins-common monitoring-plugins-basic | |
| 35 | 35 | aptitude unmarkauto $(dpkg-query -W 'linux-image-3.2.*' | cut -f1) | |
| 36 | 36 | ||
| 37 | 37 | # have a look into required and free disk space | |
| @@ -67,9 +67,10 @@ if [ -f /etc/pam.d/su.dpkg-new ]; then CFG=/etc/pam.d/su.dpkg-new; else CFG=/etc | |||
| 67 | 67 | sed -i "s/# auth required pam_wheel.so/auth required pam_wheel.so/" $CFG | |
| 68 | 68 | ||
| 69 | 69 | # (re)configure snmpd | |
| 70 | + | COMMUNITY="mycommunity"; \ | |
| 70 | 71 | if [ -f /etc/snmp/snmpd.conf.dpkg-new ]; then CFG=/etc/snmp/snmpd.conf.dpkg-new; \ | |
| 71 | 72 | else CFG=/etc/snmp/snmpd.conf; fi | |
| 72 | - | sed -i "s^#rocommunity secret 10.0.0.0/16^rocommunity mycommunity^g" $CFG | |
| 73 | + | sed -i "s^#rocommunity secret 10.0.0.0/16^rocommunity $COMMUNITY^g" $CFG | |
| 73 | 74 | sed -i s/#agentAddress/agentAddress/ $CFG | |
| 74 | 75 | sed -i "s/^ rocommunity public/# rocommunity public/" $CFG | |
| 75 | 76 | sed -i "s/^ rocommunity6 public/# rocommunity6 public/" $CFG | |
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 4 insertions
wheezy2jessie.sh
| @@ -55,6 +55,10 @@ EOF | |||
| 55 | 55 | if [ "$( dpkg -l | grep "^ii.*php5-suhosin" | wc -l)" -ge "1" ]; then \ | |
| 56 | 56 | apt-get remove php5-suhosin | |
| 57 | 57 | fi | |
| 58 | + | # remove obsolete php5-ps | |
| 59 | + | if [ "$( dpkg -l | grep "^ii.*php5-ps" | wc -l)" -ge "1" ]; then \ | |
| 60 | + | apt-get remove php5-ps | |
| 61 | + | fi | |
| 58 | 62 | # minimal system upgrade (keep sysvinit / see http://noone.org/talks/debian-ohne-systemd/debian-ohne-systemd-clt.html#%2811%29) | |
| 59 | 63 | aptitude upgrade '~U' 'sysvinit-core+' | |
| 60 | 64 | ||
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 4 insertions
wheezy2jessie.sh
| @@ -154,6 +154,10 @@ if [ "$(dpkg -l | grep "postgresql-9.1" | awk {'print $2'})" = "postgresql-9.1" | |||
| 154 | 154 | fi | |
| 155 | 155 | pg_dropcluster 9.1 main | |
| 156 | 156 | ||
| 157 | + | # xen: use our own bridge script again, when we did before | |
| 158 | + | [ $(grep "^(vif-script vif-bridge-local" /etc/xen/xend-config.sxp | wc -l) -gt 0 ] && \ | |
| 159 | + | sed -i 's/#vif.default.script="vif-bridge"/vif.default.script="vif-bridge-local"/' /etc/xen/xl.conf | |
| 160 | + | ||
| 157 | 161 | # remove old squeeze packages left around (keep eyes open!) | |
| 158 | 162 | apt-get autoremove | |
| 159 | 163 | aptitude search ?obsolete | |
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 4 insertions
wheezy2jessie.sh
| @@ -51,6 +51,10 @@ EOF | |||
| 51 | 51 | # update aptitude first | |
| 52 | 52 | [ "$(which aptitude)" = "/usr/bin/aptitude" ] && aptitude install aptitude | |
| 53 | 53 | ||
| 54 | + | # remove php5-suhosin, which doesn't exist in jessie anymore | |
| 55 | + | if [ "$( dpkg -l | grep "^ii.*php5-suhosin" | wc -l)" -ge "1" ]; then \ | |
| 56 | + | apt-get remove php5-suhosin | |
| 57 | + | fi | |
| 54 | 58 | # minimal system upgrade (keep sysvinit / see http://noone.org/talks/debian-ohne-systemd/debian-ohne-systemd-clt.html#%2811%29) | |
| 55 | 59 | aptitude upgrade '~U' 'sysvinit-core+' | |
| 56 | 60 | ||
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 1 insertion, 1 deletion
wheezy2jessie.sh
| @@ -156,7 +156,7 @@ aptitude search ?obsolete | |||
| 156 | 156 | dpkg -l | grep etch | grep -v xen | grep -v unbound | grep -v finch | awk '{print $2}' | xargs aptitude -y purge | |
| 157 | 157 | dpkg -l | grep lenny | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 158 | 158 | dpkg -l | grep -E 'deb6|squeeze' | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 159 | - | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v -E 'linux-image|mailscanner|openswan' | awk '{print $2}' | xargs aptitude -y purge | |
| 159 | + | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v -E 'linux-image|mailscanner|openswan|debian-security-support' | awk '{print $2}' | xargs aptitude -y purge | |
| 160 | 160 | aptitude -y install deborphan && deborphan | grep -v xen | grep -v libpam-cracklib | xargs aptitude -y purge | |
| 161 | 161 | dpkg -l | grep ^r | awk '{print $2}' | xargs aptitude -y purge | |
| 162 | 162 | ||
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 4 insertions
wheezy2jessie.sh
| @@ -67,6 +67,10 @@ sed -i "s/^ rocommunity public/# rocommunity public/" $CFG | |||
| 67 | 67 | sed -i "s/^ rocommunity6 public/# rocommunity6 public/" $CFG | |
| 68 | 68 | sed -i "s/agentAddress udp:127/#agentAddress udp:127/" $CFG | |
| 69 | 69 | ||
| 70 | + | # fix our xen modification | |
| 71 | + | rm -rf /etc/grub.d/09_linux_xen | |
| 72 | + | dpkg-divert --divert /etc/grub.d/09_linux_xen --rename /etc/grub.d/20_linux_xen | |
| 73 | + | ||
| 70 | 74 | # chrony update | |
| 71 | 75 | if [ -f /etc/chrony/chrony.conf.new ]; then CFG=/etc/chrony/chrony.conf.new; else CFG=/etc/chrony/chrony.conf; fi | |
| 72 | 76 | sed -i s/debian.pool/de.pool/g $CFG | |
Jan Wagner ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 1 insertion, 1 deletion
wheezy2jessie.sh
| @@ -152,7 +152,7 @@ aptitude search ?obsolete | |||
| 152 | 152 | dpkg -l | grep etch | grep -v xen | grep -v unbound | grep -v finch | awk '{print $2}' | xargs aptitude -y purge | |
| 153 | 153 | dpkg -l | grep lenny | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 154 | 154 | dpkg -l | grep -E 'deb6|squeeze' | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 155 | - | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v -E 'linux-image|mailscanner' | awk '{print $2}' | xargs aptitude -y purge | |
| 155 | + | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v -E 'linux-image|mailscanner|openswan' | awk '{print $2}' | xargs aptitude -y purge | |
| 156 | 156 | aptitude -y install deborphan && deborphan | grep -v xen | grep -v libpam-cracklib | xargs aptitude -y purge | |
| 157 | 157 | dpkg -l | grep ^r | awk '{print $2}' | xargs aptitude -y purge | |
| 158 | 158 | ||
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 2 insertions
wheezy2jessie.sh
| @@ -84,6 +84,8 @@ sed -i "s#//\$cfg\['Servers'\]\[\$i\]\['auth_type'\] = 'http';#\$cfg['Servers'][ | |||
| 84 | 84 | ||
| 85 | 85 | # maybe we want to change some shorewall config stuff again | |
| 86 | 86 | sed -i s/^startup=0/startup=1/ /etc/default/shorewall | |
| 87 | + | # nat helper needs to be install (http://shorewall.net/Helpers.html#idp8854577312) | |
| 88 | + | ucf /usr/share/shorewall/configfiles/conntrack /etc/shorewall/conntrack | |
| 87 | 89 | ||
| 88 | 90 | # full-upgrade | |
| 89 | 91 | aptitude full-upgrade | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 4 insertions
wheezy2jessie.sh
| @@ -112,7 +112,11 @@ sed -i "s/Options ExecCGI/Options +ExecCGI/" /etc/apache2/sites-available/* | |||
| 112 | 112 | # fix probable Piped Logs | |
| 113 | 113 | sed -i 's/|exec /| /' /etc/apache2/sites-available/* | |
| 114 | 114 | # check for probably incompatible Apache configration statements (see https://gist.github.com/waja/86a3a055c1fedfba3c58#upstream-changes) | |
| 115 | + | # Even lists conditional statements which might be not a problem | |
| 115 | 116 | rgrep -iE "(Order|Allow|Deny|Satisfy) " /etc/apache2/conf-enabled/* | grep -v ":#" && rgrep -iE "(Order|Allow|Deny|Satisfy) " /etc/apache2/sites-enabled/* | grep -v ":#" | |
| 117 | + | # just in case you have you DocumentRoots in /var/www, you might want to also check for .htaccess containing those | |
| 118 | + | # Even lists conditional statements which might be not a problem | |
| 119 | + | rgrep -iE "(Order|Allow|Deny|Satisfy) " --include .htaccess /var/www/ | grep -v ":#" | |
| 116 | 120 | ||
| 117 | 121 | # serveral changes may be needed to adjust content of config files | |
| 118 | 122 | # see https://gist.github.com/waja/86a3a055c1fedfba3c58#file-apache2.0to2.4.md | |