[Fai-commit] r5489 - in trunk: bin debian

Thomas Lange lange at alioth.debian.org
Mon Aug 3 12:11:15 UTC 2009


Author: lange
Date: 2009-08-03 12:11:15 +0000 (Mon, 03 Aug 2009)
New Revision: 5489

Modified:
   trunk/bin/fcopy
   trunk/debian/changelog
Log:
add die() after open command


Modified: trunk/bin/fcopy
===================================================================
--- trunk/bin/fcopy	2009-07-25 09:40:09 UTC (rev 5488)
+++ trunk/bin/fcopy	2009-08-03 12:11:15 UTC (rev 5489)
@@ -6,7 +6,7 @@
 # fcopy -- copy files using FAI classes and preserve directory structure
 #
 # This script is part of FAI (Fully Automatic Installation)
-# Copyright (C) 2000-2007 Thomas Lange, lange at informatik.uni-koeln.de
+# Copyright (C) 2000-2009 Thomas Lange, lange at informatik.uni-koeln.de
 # Universitaet zu Koeln
 # Copyright (C) 2001-2005 Henning Glawe, glaweh at physik.fu-berlin.de
 # Freie Univeritaet Berlin
@@ -29,7 +29,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 #*********************************************************************
 
-my $version = "Version 2.3, 22-october-2008";
+my $version = "Version 2.3.1, 31-july-2009";
 
 use strict;
 use File::Copy;
@@ -338,7 +338,7 @@
   my $n = my @status_files=split(/,/,$opt_update);
   ($n != 2) && die "fcopy: need both log and changes file\n";
 
-  open(LASTLOG,$status_files[0]);
+  open(LASTLOG,$status_files[0]) || die "Can't open status file $status_files[0]\n";
   while (<LASTLOG>) {
     s/\#.*//g;
     chomp;
@@ -350,7 +350,7 @@
 
   $_=$source; /([^\/]+)$/;
   my $source_base = $1;
-  open(CHANGES,$status_files[1]);
+  open(CHANGES,$status_files[1]) || die "Can't open status file $status_files[1]\n";
   while (<CHANGES>) {
     s/\#.*//g;
     chomp;
@@ -428,7 +428,7 @@
 $target  = $opt_t || $ENV{FAI_ROOT} || $ENV{target};
 $target eq "/" or $ENV{'ROOTCMD'}="chroot $target";
 $logfile = $opt_L || $ENV{LOGDIR} && "$ENV{LOGDIR}/fcopy.log" || 0;
-$logfile and (open(LOGFILE,">> $logfile") || die("can't open logfile: $!"));
+$logfile and (open(LOGFILE,">> $logfile") || die "can't open logfile: $!");
 $backupdir = $opt_b || $ENV{FAI_BACKUPDIR};
 
 if ($opt_U && -f "/var/run/fai/fai_softupdate_is_running" ) {

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-07-25 09:40:09 UTC (rev 5488)
+++ trunk/debian/changelog	2009-08-03 12:11:15 UTC (rev 5489)
@@ -1,4 +1,4 @@
-fai (3.2.23~beta10) unstable; urgency=low
+fai (3.2.23~beta11) unstable; urgency=low
 
   [ Thomas Lange ]
   * subroutines-linux: fix log message
@@ -10,6 +10,7 @@
     create /var/run/sshd (needed for ubuntu 9.10)
   * fai-class: add string warning to message
   * task_sysinfo: call blkid on all disks
+  * fcopy: add die() after open command
   * fcopy.8: improve info for calling postinst
   * fai-guide.sgml: add hint how to define classes on the kernel command
     line (closes: #497548), remove outdated information about




More information about the Fai-commit mailing list