SaveLsmap.ksh

#!/usr/bin/ksh

# SaveLsmap.ksh

# Saves all the disk mapping
# + 1 old copy of the mapping.

# - Jim Maher
# jim@FakeCompany.com

# Mail to list:
MailTo="MailGroup@FakeCompany.com"
#MailTo="james.maher@FakeCompany.com"

cd /tmp

# Save the current copy to the
# old copy.
mv lsmap.out lsmap.out.old

# Create a current file for mapping.
echo "Subject: lsmapping for `hostname`" > lsmap.out
/usr/ios/cli/ioscli lsmap -all >> lsmap.out

# Mail the file to the aix admins
/usr/sbin/sendmail $MailTo < ./lsmap.out