From 5a12e7c134274dba706667107d10d231517d3e05 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 26 Aug 2009 10:00:38 -0500 Subject: Slackware 13.0 Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P. --- source/n/httpd/doinst.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 source/n/httpd/doinst.sh (limited to 'source/n/httpd/doinst.sh') diff --git a/source/n/httpd/doinst.sh b/source/n/httpd/doinst.sh new file mode 100644 index 00000000..49e5400d --- /dev/null +++ b/source/n/httpd/doinst.sh @@ -0,0 +1,52 @@ +#!/bin/sh +if [ ! -e var/log/httpd ]; then + mkdir -p var/log/httpd + chmod 755 var/log/httpd +fi + +# Don't wipe out an existing document root: +if [ ! -L srv/www -a -d srv/www ]; then + mv srv/www srv/www.bak.$$ +fi +if [ ! -L srv/httpd -a -d srv/httpd ]; then + mv srv/httpd srv/httpd.bak.$$ +fi + +# Once again, our intent is not to wipe out anyone's +# site, but building in Apache's docs tree is not as +# good an idea as picking a unique DocumentRoot. +# +# Still, we will do what we can here to mitigate +# possible site damage: +if [ -r var/www/htdocs/index.html ]; then + if [ ! -r "var/log/packages/httpd-*upgraded*" ]; then + if [ var/www/htdocs/index.html -nt var/log/packages/httpd-*-? ]; then + cp -a var/www/htdocs/index.html var/www/htdocs/index.html.bak.$$ + fi + fi +fi + +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +# Keep same perms on rc.httpd.new: +if [ -e etc/rc.d/rc.httpd ]; then + cp -a etc/rc.d/rc.httpd etc/rc.d/rc.httpd.new.incoming + cat etc/rc.d/rc.httpd.new > etc/rc.d/rc.httpd.new.incoming + mv etc/rc.d/rc.httpd.new.incoming etc/rc.d/rc.httpd.new +fi +config etc/rc.d/rc.httpd.new +config etc/httpd/httpd.conf.new +config etc/logrotate.d/httpd.new +for conf_file in etc/httpd/extra/*.new; do + config $conf_file +done +config var/www/htdocs/index.html.new -- cgit v1.2.3