Added reboot.check script to dotfiles.
This commit is contained in:
parent
947b903b34
commit
46f8c3c8ea
@ -390,7 +390,7 @@ label = "%output%"
|
||||
|
||||
[module/reboot-check]
|
||||
type = custom/script
|
||||
exec = ~/bin/reboot.check
|
||||
exec = ~/.dotfiles/scripts/reboot.check
|
||||
format-underline = ${colors.light0}
|
||||
format-foreground = ${colors.light0}
|
||||
interval = 30
|
||||
|
||||
17
dot_dotfiles/scripts/executable_reboot.check
Normal file
17
dot_dotfiles/scripts/executable_reboot.check
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user