]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
updater: remove double files from backup.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 7 Nov 2012 20:13:45 +0000 (21:13 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 7 Nov 2012 20:13:45 +0000 (21:13 +0100)
Add some missed files.

config/rootfiles/core/65/filelists/files
config/rootfiles/core/65/filelists/setup [new symlink]
config/rootfiles/core/65/update.sh

index 6d0030e7823fbf16ddfd2baf26e5208c1f2a0ff0..62756fa6c5da40b6b34d031fdd0690039353686b 100644 (file)
@@ -15,6 +15,6 @@ srv/web/ipfire/cgi-bin/qos.cgi
 srv/web/ipfire/cgi-bin/services.cgi
 srv/web/ipfire/cgi-bin/updatexlrator.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
-usr/local/sbin/setup
 var/ipfire/langs
 var/ipfire/qos/bin/makeqosscripts.pl
+usr/local/bin/readhash
diff --git a/config/rootfiles/core/65/filelists/setup b/config/rootfiles/core/65/filelists/setup
new file mode 120000 (symlink)
index 0000000..209374b
--- /dev/null
@@ -0,0 +1 @@
+../../../common/setup
\ No newline at end of file
index 6335e1dda59377fc9e99a8396a97ca9c03f7af5c..0f1d4310ad19efec2a6e49b9b5d8270b0fde83eb 100644 (file)
 . /opt/pakfire/lib/functions.sh
 /usr/local/bin/backupctrl exclude >/dev/null 2>&1
 
+function add_to_backup ()
+{
+       # Add path to ROOTFILES but remove old entries to prevent double
+       # files in the tar
+       grep -v "^$1" /opt/pakfire/tmp/ROOTFILES > /opt/pakfire/tmp/ROOTFILES.tmp
+       mv /opt/pakfire/tmp/ROOTFILES.tmp /opt/pakfire/tmp/ROOTFILES
+       echo $1 >> /opt/pakfire/tmp/ROOTFILES
+}
+
 #
 # Remove old core updates from pakfire cache to save space...
 core=65
@@ -52,12 +61,13 @@ fi
 echo First we made a backup of all files that was inside of the
 echo update archive. This may take a while ...
 # Add some files that are not in the package to backup
-echo lib/modules >> /opt/pakfire/tmp/ROOTFILES
-echo etc/udev >> /opt/pakfire/tmp/ROOTFILES
-echo lib/udev >> /opt/pakfire/tmp/ROOTFILES
-echo boot >> /opt/pakfire/tmp/ROOTFILES
-echo etc/snort >> /opt/pakfire/tmp/ROOTFILES
-echo usr/lib/snort_* >> /opt/pakfire/tmp/ROOTFILES
+add_to_backup lib/modules
+add_to_backup etc/udev
+add_to_backup lib/udev
+add_to_backup boot
+add_to_backup etc/snort
+add_to_backup usr/lib/snort_*
+add_to_backup usr/share/zoneinfo
 
 # Backup the files
 tar cJvf /var/ipfire/backup/core-upgrade_$KVER.tar.xz \
@@ -76,12 +86,16 @@ rm -rf /lib/modules/*-ipfire
 #
 # Remove old udev rules.
 #
-cp /etc/udev/rules.d/29-ct-server-network.rules /tmp/
+if [ -e /etc/udev/rules.d/29-ct-server-network.rules ]; then
+       cp /etc/udev/rules.d/29-ct-server-network.rules /tmp/
+fi
 cp /etc/udev/rules.d/30-persistent-network.rules /tmp/
 rm -rf /etc/udev
 rm -rf /lib/udev
 mkdir -p /etc/udev/rules.d
-mv /tmp/29-ct-server-network.rules /etc/udev/rules.d/
+if [ -e /tmp/rules.d/29-ct-server-network.rules ]; then
+       mv /tmp/29-ct-server-network.rules /etc/udev/rules.d/
+fi
 mv /tmp/30-persistent-network.rules /etc/udev/rules.d/
 
 #
@@ -95,9 +109,10 @@ cp -vf /boot/grub/grub.conf /boot/grub/grub.conf.org
 /etc/init.d/squid stop
 /etc/init.d/ipsec stop
 
-#Remove old snort
+#Remove old snort and zoneinfo
 rm -rf /etc/snort
 rm -rf /usr/lib/snort_*
+rm -rf /usr/share/zoneinfo
 
 #
 #Extract files