# greenboot support, aka boot counter and boot success reporting # This will be installed via bootupd insmod increment # Check if boot_counter exists and boot_success=0 to activate this behavior. if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then # if countdown has ended, choose to boot rollback deployment, # i.e. default=1 on OSTree-based systems. if [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then set default=1 set boot_counter=-1 # otherwise decrement boot_counter else decrement boot_counter fi save_env boot_counter fi # Reset boot_success for current boot set boot_success=0 save_env boot_success