diff --git a/build-install-package b/build-install-package index 48320e2216baee1ebe9c3d9afa18effeda361d57..56247beee66f2b288b9d12d7b6e1fc3e447a7783 100755 --- a/build-install-package +++ b/build-install-package @@ -50,7 +50,7 @@ test "$5" = '""' || PPASSWD=$5 # Check if $INEP is empty if test -z "${INEP}"; then - printf "ERROR: Empty INEP.\n" + printf "ERROR (1): Empty INEP.\n" exit 1 fi # ----------------------------------------------------------------------------- @@ -59,9 +59,9 @@ printf "Checking SEED2-run files integrity... " for FILE in $(find "${MD5DIR}" -type f); do if ! check_file_integrity "${FILE}"; then - printf "ERROR: File(s) corrupted. Please, re-create integrity or %b" + printf "ERROR (2): File(s) corrupted. Please, re-create integrity or %b" "rebuild the agent files.\n" - exit 1 + exit 2 fi done @@ -78,8 +78,8 @@ mkdir -p "/tmp/${INEP}" # Copy the agent files to the temporary directory where the installation package # will be generated if ! cp -r "${AGENT_FILES}/SEED2-run" "/tmp/${INEP}/SEED2"; then - printf "ERROR: Failed to copy agent files.\n" - exit 2 + printf "ERROR (3): Failed to copy agent files.\n" + exit 3 fi # Create client conf directory and the inep file with the school INEP @@ -112,9 +112,9 @@ md5sum "${FILE}" |cut -d' ' -f1 > \ # Copy the bootstrap-install to the temporary directory if ! cp -r "${AGENT_FILES}/${BOOTSTRAP}" "/tmp/${INEP}"; then - printf "ERROR: Failed to copy ${BOOTSTRAP} to the %b" \ + printf "ERROR (4): Failed to copy ${BOOTSTRAP} to the %b" \ "temporary directory.\n" - exit 3 + exit 4 fi printf "done.\n" @@ -126,8 +126,8 @@ printf "Packaging... " cd "/tmp/${INEP}" if ! tar -czf SEED2.tgz SEED2; then - printf "ERROR: Failed to compress the agent package.\n" - exit 4 + printf "ERROR (5): Failed to compress the agent package.\n" + exit 5 fi # Create the tar md5 and compute the bootstrap lines diff --git a/build-update-package b/build-update-package index 31a317e13f2fe945c00946f5e100484f6f20544e..9af5fedad26f979dc429f0f7a191e3055eb69ac0 100755 --- a/build-update-package +++ b/build-update-package @@ -35,7 +35,7 @@ MD5DIRESC="$(echo ${MD5DIR} | sed "s/\./\\\./g")" # Get the configuration if ! source "${PREFIX}/buildpackage.conf" 2> /dev/null; then - printf "ERROR: Failed to load buildpackage.conf.\n" + printf "ERROR (1): Failed to load buildpackage.conf.\n" exit 1 fi @@ -56,8 +56,8 @@ printf "====================\n\nStarting to build the package...\n\n" # Check the readability of version file and get the version if ! test -r "${VERSIONFILE}"; then - printf "ERROR: The version file is not readable. Aborting...\n" - exit 1 + printf "ERROR (2): The version file is not readable. Aborting...\n" + exit 2 fi VERSION=$(cat ${VERSIONFILE}) @@ -73,9 +73,9 @@ printf "Checking SEED2-run files integrity... " for FILE in $(find "${MD5DIR}" -type f); do if ! check_file_integrity "${FILE}"; then - printf "ERROR: File(s) corrupted. Please, re-create integrity or %b" + printf "ERROR (3): File(s) corrupted. Please, re-create integrity or %b" "rebuild the agent files.\n" - exit 1 + exit 3 fi done @@ -87,8 +87,8 @@ printf "Compressing SEED2-run files... " TARFILE=$(tempfile --prefix=SEED2-tar) if ! tar -czf "${TARFILE}" SEED2-run; then - printf "ERROR: Failed to compress the agent files.\n" - exit 2 + printf "ERROR (4): Failed to compress the agent files.\n" + exit 4 fi cd - &> /dev/null