#!/bin/sh # $OpenBSD: INSTALL,v 1.1 1999/01/27 00:22:41 marc Exp $ # # Pre/post-installation setup of amanda set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PREFIX:-/usr/local} EXAMPLE_DIR=${EXAMPLE_DIR:-${PREFIX}/share/examples/amanda} CONF_DIR=/etc/amanda if [ $# -ne 2 ]; then echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 exit 1 fi # install the configuration files unless an existing configuration # is found in which case warn the user that it may need to be # updated. # do_configuration() { if [ ! -d ${EXAMPLE_DIR} ]; then echo "-- Can't find configuration examples: ${EXAMPLE_DIR}" >&2 exit 1 fi echo "" if [ -d ${CONF_DIR} ]; then echo "** The directory ${CONF_DIR} exists. Your existing configuration" echo "** files have not been changed. You MAY need to update your" echo "** configuration." else mkdir -p ${CONF_DIR} mkdir -p ${CONF_DIR}/csd cp ${EXAMPLE_DIR}/amanda.conf ${CONF_DIR}/csd echo "** The directory ${CONF_DIR} has been created with a sample" echo "** configuration. You probably need to modify the files for" echo "** your site." fi echo "" echo "** See amanda(8) and the sample configuration files and INSTALL" echo "** instructions in ${EXAMPLE_DIR} for more information" } # create the needed /var directories # do_var() { mkdir -p /var/amanda } # Output sample crontab entries # do_crontab() { echo "" echo "** See ${CONF_DIR}/crontab.sample for sample crontab entries" cat >${CONF_DIR}/crontab.sample <