]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - etc/periodic/daily/510.status-world-kernel
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / etc / periodic / daily / 510.status-world-kernel
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5 # Check that the running userland and kernel versions are in sync.
6
7 # If there is a global system configuration file, suck it in.
8 #
9 if [ -r /etc/defaults/periodic.conf ]
10 then
11     . /etc/defaults/periodic.conf
12     source_periodic_confs
13 fi
14
15 case "$daily_status_world_kernel" in
16     [Yy][Ee][Ss])
17         rc=0
18         _U=$(/usr/bin/uname -U 2>/dev/null)
19         _K=$(/usr/bin/uname -K 2>/dev/null)
20         [ -z "${_U}" -o -z "${_K}" ] && exit 0
21         echo ""
22         echo "Checking userland and kernel versions:"
23         if [ "${_U}" != "${_K}" ]; then
24             echo "Userland and kernel are not in sync"
25             echo "Userland version: ${_U}"
26             echo "Kernel version: ${_K}"
27             rc=1
28         else
29             echo "Userland and kernel are in sync."
30         fi
31         ;;
32
33     *)  rc=0;;
34 esac
35
36 exit $rc