#!/bin/sh
#
#	Copyright 2003 CyberSoft, Inc. All Rights Reserved.
#
# filename: boot.sh 
# This is an example script on how to use bhead with VFind.
# One possible use for this is to scan a boot sector on a
# PC based Unix system without having to process the entire
# disk drive.  This may not be a problem for floppy diskettes
# but could take a long time on a large hard disk drive unless
# bhead is used.

# Important Notice:  This is an example script only.  The user
# is responsible for editing this script to their local site
# requirements.  If you call our support line we will try to
# help you, however, we will not know anything about your site
# specific hardware configuration and that is necessary 
# information for this application.

PATH=/usr/bin:/usr/sbin:/bin:/sbin:$PATH
export PATH

VSTK_HOME=<vstk_home>
export VSTK_HOME

/bin/rm -f sysreport
touch sysreport
echo "VFIND OUTPUT REPORT -  BHEAD" >> sysreport
$VSTK_HOME/bin/vfecho-n "System Name: " >> sysreport
hostname >> sysreport
date >> sysreport
df >> sysreport
echo "============================================================" >> sysreport

# The user must change </dev/raw_device> to the correct device for their system
# and must change <blocking_factor> to the correct blocking factor for their disk.
# Note that if the input blocking factor and the output blocking factor is 
# different, you cannot use the "bs" option.  Refer to the "man" pages for "dd"
# for more information.  These values may be different for hard disks and floppy
# disk drives.

dd -if=</dev/raw_device> bs=<blocking_factor> | $VSTK_HOME/bin/bhead -b 1024 | \
      $VSTK_HOME/bin/vfind --stdin |grep "##==>>>"  >> sysreport

echo "============================================================" >> sysreport
date >> sysreport
df >> sysreport
mail root < sysreport
