Skip to content

Commit

Permalink
Add an elemental-register checker
Browse files Browse the repository at this point in the history
If the elemental-register service fails to register on a
reboot after install, reset or upgrade the checker will
cause a reboot to a fallback OS.

Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Mar 25, 2024
1 parent 594981b commit d46bc2b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

run_checks() {
# Check first if it is installed
rpm -q --quiet elemental-register
test $? -ne 0 && return

# ignore if elemental-register is not enabled
systemctl is-enabled -q elemental-register.timer
test $? -ne 0 && return

systemctl is-active -q elemental-register.service
test $? -ne 0 && exit 1
}

case "$1" in
check)
run_checks
;;
*)
echo "Usage: $0 {check}"
exit 1
;;
esac

exit 0
18 changes: 0 additions & 18 deletions framework/files/usr/libexec/elemental-checker/network-online.sh

This file was deleted.

0 comments on commit d46bc2b

Please sign in to comment.