backup: make include file parsing more robust.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 6 Mar 2015 16:22:18 +0000 (17:22 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 6 Mar 2015 16:22:18 +0000 (17:22 +0100)
config/backup/backup.pl
config/rootfiles/core/88/filelists/files

index f4823fc..d430f34 100644 (file)
@@ -160,12 +160,10 @@ sub createinclude(){
   close(DATEI);
   
   foreach (@Zeilen){
-  if ( $_ =~ /\*/){
-    my @files = `ls $_`;
+    chomp($_);
+    my @files = `find $_ -maxdepth 0 2>/dev/null`;
     foreach (@files){
       push(@include,$_);
-     }
-   }
-  else {push(@include,$_);}
+    }
   }
 }
index 5ee23b9..0251b5d 100644 (file)
@@ -2,4 +2,5 @@ etc/system-release
 etc/issue
 srv/web/ipfire/cgi-bin/fwhosts.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
+var/ipfire/backup/bin/backup.pl
 var/ipfire/langs