1277216Sgjb#!/bin/sh 2277216Sgjb# 3277216Sgjb# $FreeBSD: releng/11.0/etc/periodic/daily/510.status-world-kernel 277216 2015-01-15 19:52:19Z gjb $ 4277216Sgjb# 5277216Sgjb# Check that the running userland and kernel versions are in sync. 6277216Sgjb 7277216Sgjb# If there is a global system configuration file, suck it in. 8277216Sgjb# 9277216Sgjbif [ -r /etc/defaults/periodic.conf ] 10277216Sgjbthen 11277216Sgjb . /etc/defaults/periodic.conf 12277216Sgjb source_periodic_confs 13277216Sgjbfi 14277216Sgjb 15277216Sgjbcase "$daily_status_world_kernel" in 16277216Sgjb [Yy][Ee][Ss]) 17277216Sgjb rc=0 18277216Sgjb _U=$(/usr/bin/uname -U 2>/dev/null) 19277216Sgjb _K=$(/usr/bin/uname -K 2>/dev/null) 20277216Sgjb [ -z "${_U}" -o -z "${_K}" ] && exit 0 21277216Sgjb echo "" 22277216Sgjb echo "Checking userland and kernel versions:" 23277216Sgjb if [ "${_U}" != "${_K}" ]; then 24277216Sgjb echo "Userland and kernel are not in sync" 25277216Sgjb echo "Userland version: ${_U}" 26277216Sgjb echo "Kernel version: ${_K}" 27277216Sgjb rc=1 28277216Sgjb else 29277216Sgjb echo "Userland and kernel are in sync." 30277216Sgjb fi 31277216Sgjb ;; 32277216Sgjb 33277216Sgjb *) rc=0;; 34277216Sgjbesac 35277216Sgjb 36277216Sgjbexit $rc 37