94-update-smart-drivedb: do not fail on update-smart-drivedb errors
authorMichael Prokop <mika@grml.org>
Mon, 1 Jun 2015 07:58:59 +0000 (09:58 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 1 Jun 2015 07:58:59 +0000 (09:58 +0200)
Currently the
http://sourceforge.net/p/smartmontools/code/HEAD/tree/trunk/smartmontools/drivedb.h?format=raw
and related files on sourceforge aren't available and therefor
cause our builds to fail with:

| Updating smartmontool drivedb
| /usr/sbin/update-smart-drivedb: download from trunk failed (HTTP error)

Therefore don't break our builds but instead log a warning
message instead.

etc/grml/fai/config/scripts/GRMLBASE/94-update-smart-drivedb

index 3baa757..5c7c30e 100755 (executable)
@@ -23,9 +23,13 @@ fi
 
 echo "Updating smartmontool drivedb"
 if [ -n "$TIMEOUT" ] ; then
 
 echo "Updating smartmontool drivedb"
 if [ -n "$TIMEOUT" ] ; then
-   $ROOTCMD timeout $TIMEOUT update-smart-drivedb
+   if ! $ROOTCMD timeout $TIMEOUT update-smart-drivedb ; then
+     echo "Warning: failed to update smartmontool drivedb, ignoring failure"
+   fi
 else
 else
-   $ROOTCMD update-smart-drivedb
+   if ! $ROOTCMD update-smart-drivedb ; then
+     echo "Warning: failed to update smartmontool drivedb, ignoring failure"
+   fi
 fi
 
 ## END OF FILE #################################################################
 fi
 
 ## END OF FILE #################################################################