200.chkmounts (184265) | 200.chkmounts (197552) |
---|---|
1#!/bin/sh - 2# 3# Copyright (c) 2001 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh - 2# 3# Copyright (c) 2001 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/etc/periodic/security/200.chkmounts 184265 2008-10-25 18:45:40Z ed $ | 27# $FreeBSD: head/etc/periodic/security/200.chkmounts 197552 2009-09-28 03:32:35Z cperciva $ |
28# 29 30# Show changes in the way filesystems are mounted 31# 32 33# If there is a global system configuration file, suck it in. 34# 35if [ -r /etc/defaults/periodic.conf ] --- 9 unchanged lines hidden (view full) --- 45 46case "$daily_status_security_chkmounts_enable" in 47 [Yy][Ee][Ss]) 48 case "$daily_status_security_noamd" in 49 [Yy][Ee][Ss]) 50 ignore="${ignore}|^amd:" 51 esac 52 [ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat | 28# 29 30# Show changes in the way filesystems are mounted 31# 32 33# If there is a global system configuration file, suck it in. 34# 35if [ -r /etc/defaults/periodic.conf ] --- 9 unchanged lines hidden (view full) --- 45 46case "$daily_status_security_chkmounts_enable" in 47 [Yy][Ee][Ss]) 48 case "$daily_status_security_noamd" in 49 [Yy][Ee][Ss]) 50 ignore="${ignore}|^amd:" 51 esac 52 [ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat |
53 if ! [ -f /etc/fstab ]; then 54 export PATH_FSTAB=/dev/null 55 fi |
|
53 mount -p | sort | ${cmd} | 54 check_diff mount - "${host} changes in mounted filesystems:" 55 rc=$?;; 56 *) rc=0;; 57esac 58 59exit "$rc" | 56 mount -p | sort | ${cmd} | 57 check_diff mount - "${host} changes in mounted filesystems:" 58 rc=$?;; 59 *) rc=0;; 60esac 61 62exit "$rc" |