Initial script

This commit is contained in:
Jonny007-MKD 2020-02-09 16:33:34 +01:00
commit 29af3677f5

17
check_rebootrequired.sh Executable file
View file

@ -0,0 +1,17 @@
INPUT="/var/run/reboot-required.pkgs"
if [ ! -f "$INPUT" ]; then
echo "OK"
exit 0
fi
NUM_LINES=0
while IFS= read -r line; do
((NUM_LINES++))
done < "$INPUT"
echo "WARNING: $NUM_LINES packages require a reboot:"
cat "$INPUT"
exit 1