Added reboot.check script to dotfiles.

This commit is contained in:
Joachim 2021-02-23 14:38:50 +01:00
parent 947b903b34
commit 46f8c3c8ea
2 changed files with 18 additions and 1 deletions

View File

@ -390,7 +390,7 @@ label = "%output%"
[module/reboot-check] [module/reboot-check]
type = custom/script type = custom/script
exec = ~/bin/reboot.check exec = ~/.dotfiles/scripts/reboot.check
format-underline = ${colors.light0} format-underline = ${colors.light0}
format-foreground = ${colors.light0} format-foreground = ${colors.light0}
interval = 30 interval = 30

View File

@ -0,0 +1,17 @@
#!/bin/sh
NEXTLINE=0
FIND=""
for I in `file /boot/vmlinuz*`; do
if [ ${NEXTLINE} -eq 1 ]; then
FIND="${I}"
NEXTLINE=0
else
if [ "${I}" = "version" ]; then NEXTLINE=1; fi
fi
done
if [ ! "${FIND}" = "" ]; then
CURRENT_KERNEL=`uname -r`
if [ ! "${CURRENT_KERNEL}" = "${FIND}" ]; then
echo "Boot required"
fi
fi