# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils rpm DOC_ID="279329" Q_ID="Q180968" RALUS_FILE_SRC="${Q_ID}.BE.RALUS.${PV}.tar_${DOC_ID}.gz" RALUS_FILE="${Q_ID}.BE.RALUS.${PV}_${DOC_ID}.tar.gz" FETCH_URI="http://seer.support.veritas.com/docs/${DOC_ID}.htm" VRTSRALUS_PV="10.00.5629-0" VRTSVXMSA_PV="4.2.1-211" DESCRIPTION="Symantec Backup Exec - Remote Agent for Linux or Unix Servers" HOMEPAGE="http://www.veritas.com/" SRC_URI="${RALUS_FILE}" LICENSE="VERITAS-EUSLA" SLOT="0" KEYWORDS="~x86" IUSE="" RESTRICT="fetch" RDEPEND=">=sys-libs/lib-compat-1.4" S="${WORKDIR}" pkg_nofetch() { einfo "Please download ${RALUS_FILE_SRC} from:" einfo ${FETCH_URI} einfo "and move it to ${DISTDIR}/${RALUS_FILE}" } src_unpack() { if [ ! -r ${DISTDIR}/${RALUS_FILE} ]; then die "cannot read ${RALUS_FILE}. Please check the permission and try again." fi unpack ${RALUS_FILE} # unpack the required rpm's rpm_unpack linux/pkgs/linux/VRTSralus-${VRTSRALUS_PV}.i386.rpm rpm_unpack linux/pkgs/linux/VRTSvxmsa-${VRTSVXMSA_PV}.i386.rpm } src_install() { # add the beoper group enewgroup beoper # install package files to /etc chmod -R 600 ${WORKDIR}/etc mv ${WORKDIR}/etc ${D} # install package files to /opt chmod -R 500 ${WORKDIR}/opt mv ${WORKDIR}/opt ${D} # install package files to /var chmod -R 600 ${WORKDIR}/var mv ${WORKDIR}/var ${D} # install the initscript newinitd ${FILESDIR}/backupexec-ralus.rc backupexec-ralus # install the initscript config file newconfd ${FILESDIR}/backupexec-ralus.confd backupexec-ralus } pkg_postinst() { einfo "" einfo "You must add a user to the beoper group for the remote agent to function." einfo "The user must have permission to access the files that you wish to backup." einfo "gpasswd -a beoper" einfo "" einfo "By default the remote agent will use port 10000. If this port is already in use," einfo "edit /etc/services and add the ndmp service with a more suitable port." einfo "ndmp /tcp" einfo "" einfo "You must configure /etc/VRTSralus/ralus.cfg before starting the remote agent." einfo "Refer to the Backup Exec Administrator's Guide for configuration options." einfo ${FETCH_URI} einfo "" einfo "To start the remote agent, run:" einfo "/etc/init.d/backupexec-ralus start" einfo "" einfo "To have the remote agent start at boot, run:" einfo "rc-update add backupexec-ralus default" einfo "" }