Ok.
Hope I'm not just being obvious here, maybe I'm missing something implied in your question. The script below will return:
0 - success
1 - couldn't unmount the file system
2 - backup failed
3 - couldn't mount the file system afterwards
[tt]
#!/bin/ksh
FS=$1; shift # get the name of the filesystem from the command line
umount $FS
rc=$?
if [[ $rc != 0 ]]
then
exit 1
fi
/usr/sbin/backup -f'/dev/rmt0' -'0' $FS
rc=$?
if [[ $rc != 0 ]]
then
exit 2
fi
mount $FS
rc=$?
if [[ $rc != 0 ]]
then
exit 3
fi
exit 0
[/tt]
Anyone see any typos? (I'm at home, no unix here (yet))
Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.