-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
594981b
commit d46bc2b
Showing
2 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
framework/files/usr/libexec/elemental-checker/elemental-register.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
framework/files/usr/libexec/elemental-checker/network-online.sh
This file was deleted.
Oops, something went wrong.