[Fai-commit] r5310 - in trunk: debian lib

Thomas Lange lange at alioth.debian.org
Thu Apr 9 13:50:48 UTC 2009


Author: lange
Date: 2009-04-09 13:50:47 +0000 (Thu, 09 Apr 2009)
New Revision: 5310

Modified:
   trunk/debian/changelog
   trunk/lib/get-config-dir-cvs
   trunk/lib/get-config-dir-git
   trunk/lib/get-config-dir-nfs
   trunk/lib/get-config-dir-svn
   trunk/lib/subroutines-linux
Log:
* lib/get-config-dir-*: task_error requires the exit code of the
  preceeding command as the second argument
* lib/subroutines-linux: The exit code of a command earlier in a pipe
  must be read using $PIPESTATUS, not $? (closes: #444210)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-04-09 13:29:32 UTC (rev 5309)
+++ trunk/debian/changelog	2009-04-09 13:50:47 UTC (rev 5310)
@@ -65,8 +65,12 @@
   * setup-storage/Parser.pm, setup-storage/Commands.pm: Make random
     initialization of encrypted partitions configurable
   * setup-storage.8: Document new encryption possibilities
+  * lib/get-config-dir-*: task_error requires the exit code of the
+    preceeding command as the second argument
+  * lib/subroutines-linux: The exit code of a command earlier in a pipe
+    must be read using $PIPESTATUS, not $? (closes: #444210)
 
- -- Thomas Lange <lange at debian.org>  Thu, 09 Apr 2009 14:50:37 +0200
+ -- Thomas Lange <lange at debian.org>  Thu, 09 Apr 2009 15:49:36 +0200
 
  (3.2.17) unstable; urgency=medium
 

Modified: trunk/lib/get-config-dir-cvs
===================================================================
--- trunk/lib/get-config-dir-cvs	2009-04-09 13:29:32 UTC (rev 5309)
+++ trunk/lib/get-config-dir-cvs	2009-04-09 13:50:47 UTC (rev 5310)
@@ -36,11 +36,11 @@
    echo "Updating CVS in $FAI"
    cd $FAI
    cvs -q up -P $tag -d -C > $LOGDIR/getconf.log
-   task_error 701
+   task_error 701 $?
 else 
    echo "Checking out CVS"
    cd $(dirname "$FAI")
    cvs -q co -P -d $(basename "$FAI") \
      $tag $module > $LOGDIR/getconf.log
-   task_error 702
+   task_error 702 $?
 fi

Modified: trunk/lib/get-config-dir-git
===================================================================
--- trunk/lib/get-config-dir-git	2009-04-09 13:29:32 UTC (rev 5309)
+++ trunk/lib/get-config-dir-git	2009-04-09 13:50:47 UTC (rev 5310)
@@ -32,9 +32,9 @@
    echo "Updating git copy in $FAI"
    cd $FAI
    git pull
-   task_error 701
+   task_error 701 $?
 else 
    echo "Checking out from git"
    git clone $giturl $FAI 
-   task_error 702
+   task_error 702 $?
 fi

Modified: trunk/lib/get-config-dir-nfs
===================================================================
--- trunk/lib/get-config-dir-nfs	2009-04-09 13:29:32 UTC (rev 5309)
+++ trunk/lib/get-config-dir-nfs	2009-04-09 13:50:47 UTC (rev 5310)
@@ -12,4 +12,4 @@
 
 mount -n $romountopt $server:$nfspath $FAI &&
   echo "Configuration space $server:$nfspath mounted to $FAI"
-task_error 701
+task_error 701 $?

Modified: trunk/lib/get-config-dir-svn
===================================================================
--- trunk/lib/get-config-dir-svn	2009-04-09 13:29:32 UTC (rev 5309)
+++ trunk/lib/get-config-dir-svn	2009-04-09 13:50:47 UTC (rev 5310)
@@ -50,9 +50,9 @@
    echo "Updating SVN in $FAI"
    cd $FAI
    svn up $user | grep -v 'Updated to revision' > $LOGDIR/getconf.log
-   task_error 701
+   task_error 701 $?
 else 
    echo "Checking out SVN"
    svn co $user $svnurl $FAI | grep -v 'Checked out revision' > $LOGDIR/getconf.log
-   task_error 702
+   task_error 702 $?
 fi

Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux	2009-04-09 13:29:32 UTC (rev 5309)
+++ trunk/lib/subroutines-linux	2009-04-09 13:50:47 UTC (rev 5310)
@@ -250,10 +250,10 @@
     echo "Installing software may take a while"
     if [ "$debug" ]; then
 	install_packages | tee -a $LOGDIR/software.log
-	task_error 471 $?
+	task_error 471 ${PIPESTATUS[0]}
     elif [ "$verbose" ]; then
 	install_packages </dev/null 2>&1 | tee -a $LOGDIR/software.log
-	task_error 471 $?
+	task_error 471 ${PIPESTATUS[0]}
     else
 	install_packages </dev/null >> $LOGDIR/software.log 2>&1
 	task_error 471 $?




More information about the Fai-commit mailing list