3 LOGFILE=`mktemp /tmp/amanda-server-postinstall.log.XXXXXXXXXXX`
5 echo "Unable to mktemp!" 1>&2
8 amanda_user=amandabackup; export amanda_user
9 amanda_group=disk; export amanda_group
10 # BASEDIR is set by either in pkginfo, or if not set, by pkgadd at installtime.
11 # Unfortunately, it messes things up to have basedir="/".
12 [ "x${BASEDIR}" = "x/" ] && basedir="" || basedir=${BASEDIR}
13 AMANDAHOMEDIR="${basedir}%%AMANDAHOMEDIR%%"; export AMANDAHOMEDIR
15 arch=%%ARCH%%; export arch
16 LOGDIR="${basedir}%%LOGDIR%%"; export LOGDIR
17 INSTALL_LOG="${LOGDIR}/install.log"; export INSTALL_LOG
18 SYSCONFDIR="${basedir}/etc"; export SYSCONFDIR
19 SBINDIR="${basedir}/usr/sbin"; export SBINDIR
22 AMANDATES=${SYSCONFDIR}/amandates; export AMANDATES
24 # ---------- Common functions ------------
26 %%POST_INST_FUNCTIONS%%
28 # -------- End Common functions ----------
32 if [ "$rel" = "5.8" ]; then
33 check_inetd "amandaserver"
35 0) backup_inetd "amandaserver"
36 install_inetd "amandaserver"
38 1) install_inetd "amandaserver" ;;
39 2) logger "Error: Amanda service not installed because inetd config was not found: either inetd config is not present or inetd is a directory." ;;
41 # Amanda clients should not have the server xinetd installed.
42 check_inetd "amandaclient"
44 0) backup_inetd "amandaclient" ;;
48 # Solaris 10+ uses smf, but we can't differentiate server from client, all
49 # entries end up named "amanda"
52 0) backup_smf || logger "Warning: Backup of existing service failed. continuing..."
53 install_smf "amandaserver" || \
54 logger "Warning: Amanda service not installed."
56 1) install_smf "amandaserver" ;;
65 check_amandahosts_entry ${amanda_user} amdump
66 check_amandahosts_perms
73 logger "Amanda installation complete."
74 cat $LOGFILE >> $INSTALL_LOG && {
76 echo "Amanda installation log can be found in '${INSTALL_LOG}'."
78 echo "Amanda postinstall log can be found in $LOGFILE"