Here is the shell script which does the directory initialization at
the far end of your mirror.
It's the script which is called "dobackup_initbdir"
The reason you use it instead of just a naked mkdir is because if you
call mkdir by itself, and the directory already exists, you'll get an error
back. you'll also get an error back if the directory doesn't exist, and
can't be created for some reason. Since you can't tell which error
occurred with mkdir alone, this script takes care of that for you.
-Brian
#!/bin/sh
#$Id: dobackup_initbdir,v 1.1 2001/04/14 00:35:36 buhrow Exp buhrow $
#NAME: Brian Buhrow
#DATE: April 13, 2001
#PURPOSE: This script creates a directory
#from $1. If the directory already exists, it returns 0.
#If it doesn't exist and it can create it, it returns 0.
#Else, it exits with a nonzero status
PATH=/bin:/usr/bin:/usr/pkg/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin; export
PATH
if [ ! -d $1 ]; then
mkdir $1
if [ $? -ne 0 ]; then
exit 1
fi
fi
exit 0
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug