]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Fixed Upgrade not backup cache directores of proxy and booster
authorManiacikarus <maniacikarus@ipfire.org>
Wed, 5 Nov 2008 17:36:08 +0000 (18:36 +0100)
committerManiacikarus <maniacikarus@ipfire.org>
Wed, 5 Nov 2008 17:36:08 +0000 (18:36 +0100)
Do not override some important config file when upgrade

config/rootfiles/updater/update.sh
lfs/updater

index e6b26d3224956226af20c7d6cbf28aa194f4f14e..ad84c3b61e4a7ef9a07e2a1a6de2e93ef643106e 100755 (executable)
@@ -63,6 +63,14 @@ echo srv/web/ipfire/cgi-bin/traffics.cgi >> /opt/pakfire/tmp/ROOTFILES
 echo srv/web/ipfire/cgi-bin/graphs.cgi >> /opt/pakfire/tmp/ROOTFILES
 echo srv/web/ipfire/cgi-bin/qosgraph.cgi >> /opt/pakfire/tmp/ROOTFILES
 #
+
+# Remove some files from the rootfiles
+cat /opt/pakfire/tmp/ROOTFILES \
+       | grep -v "var/log/cache" \
+       | grep -v "var/updatecache" > /opt/pakfire/tmp/ROOTFILESNEW
+
+mv -f /opt/pakfire/tmp/ROOTFILESNEW /opt/pakfire/tmp/ROOTFILES
+
 tar czvf /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.gz \
    -T /opt/pakfire/tmp/ROOTFILES --exclude='#*' -C / > /dev/null 2>&1 
 echo
index 2cf06aa50ef00f91af2505ab7c859bbfa7e19ea6..8e280d2400905825432329cf7c56e7200fc68a97 100644 (file)
@@ -55,6 +55,18 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        mkdir -p /install/packages
 
        find $(DIR_SRC)/config/rootfiles/updater/filelists/* -maxdepth 1 | xargs cat >> /tmp/ROOTFILES
+       cat /tmp/ROOTFILES \
+               | grep -v "etc/httpd/conf" \
+               | grep -v "etc/ssl/openssl.cnf" \
+               | grep -v "etc/ssh/sshd_config" \
+               | grep -v "etc/ipsec.conf" \
+               | grep -v "etc/ipsec.secrets" \
+               | grep -v "etc/snort/snort.conf" \
+               | grep -v "etc/squid/squid.conf" \
+               | grep -v "srv/web/ipfire/html/proxy.pac" \
+               | grep -v "srv/web/ipfire/html/wpad.dat" \
+               > /tmp/ROOTFILESNEW
+       mv -f /tmp/ROOTFILESNEW /tmp/ROOTFILES
        sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
        tar -c -C / --files-from=/tmp/ROOTFILES \
                -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \