Last active
October 30, 2019 17:12
-
-
Save bachp/03f03486a9c7e1bea8d4db3d8c73cfb4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if [ $(readlink /run/current-system/kernel) = $(readlink /run/booted-system/kernel) ]; then echo "no"; else echo "yes"; fi |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| CURRENT_KERNEL=$(readlink /run/current-system/kernel) | |
| BOOTED_KERNEL=$(readlink /run/booted-system/kernel) | |
| if [ $CURRENT_KERNEL = $BOOTED_KERNEL ] | |
| then | |
| echo "No reboot needed" | |
| exit 0 | |
| else | |
| echo "Reboot needed" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment