File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,13 +26,15 @@ IMAGE_VERSION_STRING="${LXC_IMAGE}@${LXC_IMAGE_DIGEST}"
2626
2727if [[ " ${IMAGE_VERSION_STRING} " == " $( cat /etc/image) " ]]; then
2828 echo " No new image version available. Exiting."
29+ report_info " cuos:update:not_needed" " The system is up-to-date"
2930 exit 22
3031fi
3132
3233AVAIL_BYTES=$( df -B1 " /" | awk ' NR==2 {print $4}' )
3334REQUIRED_BYTES=$(( 2 * 1024 * 1024 * 1024 ))
3435if [ " $AVAIL_BYTES " -le " $REQUIRED_BYTES " ]; then
3536 echo " Not enough free space in ${TARGET_ROOT} (required: >2GB, available: $(( AVAIL_BYTES/ 1024 / 1024 )) MB). Aborting update." >&2
37+ report_info " cuos:update:no_space" " Not enough free disk space available"
3638 exit 21
3739fi
3840
4951
5052if [[ " ${IMAGE_VERSION} @${NEW_DIGEST} " == " $( cat /etc/image) " ]]; then
5153 echo " No new image version available (post). Exiting."
54+ report_info " cuos:update:not_needed" " The system is up-to-date"
5255 exit 22
5356fi
5457
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ OS_DIGEST="$(jq -r --arg arch "${OS_ARCH}" '.[$arch+"_image_digest"] // .os_imag
3030IMAGE_VERSION_STRING=" ${OS_IMAGE} @${OS_DIGEST} "
3131
3232if [[ " ${IMAGE_VERSION_STRING} " == " $( cat /etc/image) " ]]; then
33- echo " No new image version available. Exiting."
33+ echo " No new image version available. Exiting (pre)"
34+ report_info " cuos:update:not_needed" " The system is up-to-date"
3435 exit 22
3536fi
3637
@@ -81,10 +82,11 @@ if [[ "${DOCKER_EXIT_CODE}" = "0" ]]; then
8182
8283 sync
8384 reboot
84- elif [[ " ${DOCKER_EXIT_CODE} " = " 20 " ]]; then
85+ elif [[ " ${DOCKER_EXIT_CODE} " = " 102 " ]]; then
8586 echo " No new image version available."
86- report_info " cuos:update:not_needed" " No new image version available"
87- elif [[ " ${DOCKER_EXIT_CODE} " = " 22" ]]; then
87+ report_info " cuos:update:not_needed" " The system is up-to-date"
88+
89+ elif [[ " ${DOCKER_EXIT_CODE} " = " 101" ]]; then
8890 echo " Not enough free disk space available"
8991 report_info " cuos:update:no_space" " Not enough free disk space available"
9092else
Original file line number Diff line number Diff line change 7373IMAGE_VERSION_STRING=" ${IMAGE} @${NEW_DIGEST} "
7474
7575if [[ " ${IMAGE_VERSION_STRING} " == " $( cat /etc/image 2> /dev/null) " ]]; then
76- raise_info 102 " No OS update failable "
76+ raise_info 102 " No OS update available "
7777fi
7878
7979echo " INFO: Updating OS slot ${SLOT} to ${IMAGE} "
You can’t perform that action at this time.
0 commit comments