#!/bin/sh # # fscheck.setup - generate master files for fscheck to use. # # (This should be run as root). # PATH=/usr/bin:/bin export PATH # Set CHECKDIRS to the list of directories you want to put in # your check list. # # Set MASTER_LS to the path of the master checklist generated # with "ls". # # Set MASTER_SUM to the path of the master checklist generated # with "sum". CHECKDIRS="/bin /etc /usr/bin /usr/etc /usr/lib /usr/ucb" MASTER_LS=ls.master MASTER_SUM=sum.master # # Generate a checklist using ls. # ls -alsgR $CHECKDIRS > $MASTER_LS # # Generate a checklist using sum. # # The first find command should be used on Berkeley systems - that # version of sum does not print the file name, so we need to print it # using echo. The second find command should be used on System V # systems. # find $CHECKDIRS -type f -exec echo -n {} " " \; \ -exec sum {} \; > $MASTER_SUM # find $CHECKDIRS -type f -exec sum {} \; > $MASTER_SUM exit 0