[Fai-commit] r6758 - trunk/lib

Thomas Lange lange at alioth.debian.org
Sun Oct 23 09:52:55 UTC 2011


Author: lange
Date: 2011-10-23 09:52:54 +0000 (Sun, 23 Oct 2011)
New Revision: 6758

Modified:
   trunk/lib/get-config-dir-cvs
   trunk/lib/get-config-dir-git
   trunk/lib/get-config-dir-hg
   trunk/lib/get-config-dir-http
   trunk/lib/get-config-dir-nfs
   trunk/lib/get-config-dir-svn
   trunk/lib/subroutines
Log:
raise error values from 70x to 88x.

These are important errors, so FAI should stop in almost every case.
Now STOP_ON_ERROR can be set to a bigger value than 700, without
ignoring these errors.


Modified: trunk/lib/get-config-dir-cvs
===================================================================
--- trunk/lib/get-config-dir-cvs	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/get-config-dir-cvs	2011-10-23 09:52:54 UTC (rev 6758)
@@ -36,10 +36,10 @@
    echo "Updating CVS in $FAI"
    cd $FAI
    cvs -q up -P $tag -d -C > $LOGDIR/getconf.log
-   task_error 701 $?
+   task_error 881 $?
 else 
    echo "Checking out CVS"
    cd ${FAI%/*}     # cd to dirname $FAI
    cvs -q co -P -d ${FAI##*/} $tag $module > $LOGDIR/getconf.log   # -d uses basename of $FAI
-   task_error 702 $?
+   task_error 882 $?
 fi

Modified: trunk/lib/get-config-dir-git
===================================================================
--- trunk/lib/get-config-dir-git	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/get-config-dir-git	2011-10-23 09:52:54 UTC (rev 6758)
@@ -37,16 +37,16 @@
     if [ `git remote show -n origin | egrep -m1 -o '[^[:space:]]+://.+'` == "$giturl" ]; then
         echo "Updating git copy in $FAI"
         git pull
-    	task_error 701 $?
+    	task_error 881 $?
     else
         echo "$FAI already contains a git repository, but it is not from $giturl!" >&2
         echo "Please delete $FAI manually. Aborting..." >&2
-        task_error 703
+        task_error 883
     fi
 else 
    echo "Checking out from git"
    # cloning into an existing directory is not allowed
    if [ -d $FAI ]; then rmdir $FAI; fi
    git clone $giturl $FAI 
-   task_error 702 $?
+   task_error 882 $?
 fi

Modified: trunk/lib/get-config-dir-hg
===================================================================
--- trunk/lib/get-config-dir-hg	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/get-config-dir-hg	2011-10-23 09:52:54 UTC (rev 6758)
@@ -35,11 +35,11 @@
    echo "Updating hg copy in $FAI"
    cd $FAI
    hg pull
-   task_error 701 $?
+   task_error 881 $?
 else 
    echo "Checking out from hg"
    # cloning into an existing directory is not allowed
    if [ -d $FAI ]; then rmdir $FAI; fi
    hg clone $hgurl $FAI 
-   task_error 702 $?
+   task_error 882 $?
 fi

Modified: trunk/lib/get-config-dir-http
===================================================================
--- trunk/lib/get-config-dir-http	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/get-config-dir-http	2011-10-23 09:52:54 UTC (rev 6758)
@@ -36,18 +36,18 @@
    echo "Checksum file $file.md5 successfully downloaded."
 else
    echo "Checksum file ${FAI_CONFIG_SRC}.md5 failed to download. Aborting."
-   task_error 701
+   task_error 881
 fi
 
 # now download tarball of config space
 echo -n "Getting configuration space tarball from $FAI_CONFIG_SRC ..."
 wget -q -t 3 $FAI_CONFIG_SRC && echo "done"
-task_error 702 $?
+task_error 882 $?
 
 # check the md5 sum
 echo -n "MD5 checksum of "
 md5sum -c $file.md5 || echo "checksum mismatch. ERROR."
-task_error 703 $?
+task_error 883 $?
 
 # extraxt the downloaded file using ftar. Therefore define a class
 # with the basename of the file

Modified: trunk/lib/get-config-dir-nfs
===================================================================
--- trunk/lib/get-config-dir-nfs	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/get-config-dir-nfs	2011-10-23 09:52:54 UTC (rev 6758)
@@ -12,4 +12,4 @@
 
 mount $romountopt $server:$nfspath $FAI &&
   echo "Configuration space $server:$nfspath mounted to $FAI"
-task_error 701 $?
+task_error 881 $?

Modified: trunk/lib/get-config-dir-svn
===================================================================
--- trunk/lib/get-config-dir-svn	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/get-config-dir-svn	2011-10-23 09:52:54 UTC (rev 6758)
@@ -57,15 +57,15 @@
         echo "Updating SVN in $FAI"
         cd $FAI
         svn up $user $pass | grep -v 'Updated to revision' > $LOGDIR/getconf.log
-        task_error 701 ${PIPESTATUS[0]}
+        task_error 881 ${PIPESTATUS[0]}
     else
         echo "$FAI already contains a svn repository, but it is not from $svnurl!" >&2
         echo "Please delete $FAI manually. Fatal error." >&2
-        task_error 703
+        task_error 883
     fi
 else 
    echo "Checking out SVN"
    svn co $user $pass $svnurl $FAI | grep -v 'Checked out revision' > $LOGDIR/getconf.log
-   task_error 702 ${PIPESTATUS[0]}
+   task_error 882 ${PIPESTATUS[0]}
 fi
 

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2011-10-23 09:49:59 UTC (rev 6757)
+++ trunk/lib/subroutines	2011-10-23 09:52:54 UTC (rev 6758)
@@ -452,8 +452,8 @@
     done
     mount2dir $FAI_ROOT $LOGDIR/fstab
     if [ "$?" -ne 0 ]; then
-	sendmon "TASKERROR mountdisks 705"
-	task_error 705
+	sendmon "TASKERROR mountdisks 885"
+	task_error 885
     fi
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -




More information about the Fai-commit mailing list