backup: Fix expanding glogging
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Nov 2018 10:27:09 +0000 (10:27 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Nov 2018 10:27:09 +0000 (10:27 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/backup/backup.pl

index ddf2bf2..3accbcf 100644 (file)
@@ -38,11 +38,11 @@ process_includes() {
        for include in $@; do
                local file
                while read -r file; do
-                       while read file; do
+                       for file in ${file}; do
                                if [ -e "${file}" ]; then
                                        echo "${file}"
                                fi
-                       done <<< ${file}
+                       done
                done < "${include}"
        done | sort -u
 }
@@ -201,6 +201,10 @@ main() {
                        mkdir -p /var/ipfire/backup/addons/{backup,includes}
                        ;;
 
+               list)
+                       process_includes "/var/ipfire/backup/include" "/var/ipfire/backup/include.user"
+                       ;;
+
                /var/ipfire/backup/*.ipf|/var/ipfire/backup/addons/backup/*.ipf|/var/tmp/backupiso/*.iso)
                        unlink "${command}"
                        ;;