diff options
Diffstat (limited to 'recipes/images/files/library/create_configblock.sh')
-rwxr-xr-x | recipes/images/files/library/create_configblock.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/recipes/images/files/library/create_configblock.sh b/recipes/images/files/library/create_configblock.sh index f21b05c..3829fbb 100755 --- a/recipes/images/files/library/create_configblock.sh +++ b/recipes/images/files/library/create_configblock.sh @@ -1,5 +1,8 @@ #! /bin/sh +# exit on error +set -e + Usage() { echo "create_configblock creates a configblock binary from the info on the module sticker." @@ -31,6 +34,10 @@ while getopts "h" Option ; do esac done +#sanity check for some programs +AWKTEST=`echo 12345678abcdefgh | awk 'BEGIN{ FIELDWIDTHS = "8 8"} {print $2}'` || true +[ "${AWKTEST}x" = "abcdefghx" ] || { echo >&2 "Program gawk not available. Aborting."; exit 1; } + # autotect MODTYPE from from rootfs directory CNT=`grep -c "T20" rootfs/etc/issue || true` if [ ${CNT} -ge 1 ] ; then |