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