imladris is booted and working
This commit is contained in:
18
script/check-restart.sh
Executable file
18
script/check-restart.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use feature 'say';
|
||||
|
||||
my @booted = split("/", `readlink -f /run/booted-system/kernel`);
|
||||
my @current = split("/", `readlink -f /run/current-system/kernel`);
|
||||
|
||||
if ($booted[3] ne $current[3]) {
|
||||
say "Restart required!";
|
||||
say "old: $booted[3]";
|
||||
say "new: $current[3]";
|
||||
exit 1;
|
||||
} else {
|
||||
say "system is clean..";
|
||||
}
|
||||
Reference in New Issue
Block a user