]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/pakfire/lib/functions.sh
Merge remote-tracking branch 'origin/next' into kernel-update
[people/teissler/ipfire-2.x.git] / src / pakfire / lib / functions.sh
index 21aaee22a4ffee963f854f16634c53cb756a09c8..bc05bd01e0112d137715241c36e5cfc8faed9a69 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2007-2012  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
 
 extract_files() {
        echo "Extracting files..."
-       tar xvf /opt/pakfire/tmp/files --preserve --numeric-owner -C /
+       tar xvf /opt/pakfire/tmp/files --no-overwrite-dir -p --numeric-owner -C /
+       echo "...Finished."
+}
+
+extract_backup_includes() {
+       echo "Extracting backup includes..."
+       tar xvf /opt/pakfire/tmp/files --no-overwrite-dir -p --numeric-owner -C / \
+               var/ipfire/backup/addons/includes
        echo "...Finished."
 }
 
 remove_files() {
        echo "Removing files..."
-       for i in $(cat /opt/pakfire/tmp/ROOTFILES); do
-       rm -rfv /${i}
+       for i in $(cat /opt/pakfire/db/rootfiles/${NAME}); do
+           rm -rfv /${i}
        done
        echo "...Finished."
 }
@@ -93,3 +100,10 @@ stop_service() {
                /etc/init.d/${1} stop
        fi
 }
+
+rebuild_langcache() {
+       echo "Rebuilding language cache..."
+       perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
+       echo "...Finished."
+}
+