Jan Wagner revisó este gist 9 years ago. Ir a la revisión
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 revisó este gist 9 years ago. Ir a la revisión
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 revisó este gist 9 years ago. Ir a la revisión
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 revisó este gist 9 years ago. Ir a la revisión
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 revisó este gist 9 years ago. Ir a la revisión
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 revisó este gist 10 years ago. Ir a la revisión
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 revisó este gist 10 years ago. Ir a la revisión
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 | |
Jan Wagner revisó este gist 10 years ago. Ir a la revisión
1 file changed, 11 insertions
x_fix_apache2.4_slash_docroot.sh(archivo creado)
| @@ -0,0 +1,11 @@ | |||
| 1 | + | # when <Directory > config is applied on / instead of DocumentRoot, we need to fix that | |
| 2 | + | cat > /tmp/a2conf_dir_migrate << EOF | |
| 3 | + | grep -i "<directory />" /etc/apache2/sites-enabled/* | |
| 4 | + | for HOST in \$(grep -i "<directory />" /etc/apache2/sites-enabled/* | grep -v 000-default | awk -F':' '{print \$1}' | sed "s/.conf//" | sed "s#^/etc/apache2/sites-enabled/##"); do | |
| 5 | + | DOCROOT=\$(grep DocumentRoot /etc/apache2/sites-enabled/\${HOST} | awk '{print \$2}'); | |
| 6 | + | sed -i "s#<Directory />#<Directory \${DOCROOT}>#" /etc/apache2/sites-available/\${HOST}; | |
| 7 | + | done | |
| 8 | + | echo -e "Migration done.\nRemaining problematic configurations, please investigate:" | |
| 9 | + | grep -i "<directory />" /etc/apache2/sites-enabled/* | |
| 10 | + | EOF | |
| 11 | + | sh /tmp/a2conf_dir_migrate | |
Jan Wagner revisó este gist 10 years ago. Ir a la revisión
1 file changed, 0 insertions, 0 deletions
apache2.0to2.4.md renombrado a z_apache2.0to2.4.md
Archivo renombrado sin cambios
Jan Wagner revisó este gist 10 years ago. Ir a la revisión
1 file changed, 2 insertions, 2 deletions
wheezy2jessie.sh
| @@ -145,8 +145,8 @@ apt-get autoremove | |||
| 145 | 145 | aptitude search ?obsolete | |
| 146 | 146 | dpkg -l | grep etch | grep -v xen | grep -v unbound | grep -v finch | awk '{print $2}' | xargs aptitude -y purge | |
| 147 | 147 | dpkg -l | grep lenny | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 148 | - | dpkg -l | grep squeeze | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 149 | - | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v linux-image | awk '{print $2}' | xargs aptitude -y purge | |
| 148 | + | dpkg -l | grep -E 'deb6|squeeze' | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 149 | + | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v -E 'linux-image|mailscanner' | awk '{print $2}' | xargs aptitude -y purge | |
| 150 | 150 | aptitude -y install deborphan && deborphan | grep -v xen | grep -v libpam-cracklib | xargs aptitude -y purge | |
| 151 | 151 | dpkg -l | grep ^r | awk '{print $2}' | xargs aptitude -y purge | |
| 152 | 152 | ||