openbsd-ports/misc/amanda/pkg/INSTALL-client
2003-04-14 15:02:08 +00:00

43 lines
750 B
Bash

#!/bin/sh
# $OpenBSD: INSTALL-client,v 1.2 2003/04/14 15:02:09 wilfried Exp $
#
# Pre/post-installation setup of amanda
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# create the needed /var directories
#
do_var()
{
mkdir -p /var/amanda/gnutar-lists
chown -R operator:operator /var/amanda
}
# create the needed /etc/amandates file if it does not exist
# note that it is hardwired to be in /etc, not ${SYSCONFDIR}
#
do_amandates()
{
touch /etc/amandates
chown operator:operator /etc/amandates
}
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
do_var
do_amandates
echo ""
;;
esac
exit 0