[BACK]Return to INSTALL CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / sysutils / sysbuild-user

File: [cvs.NetBSD.org] / pkgsrc / sysutils / sysbuild-user / INSTALL (download)

Revision 1.1, Wed Jul 25 12:20:08 2012 UTC (2 years, 1 month ago) by jmmv
Branch: MAIN
CVS Tags: pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, HEAD

Initial addition of sysbuild-user, version 1.0:

This package installs an unprivileged user for the sysbuild utility
provided by the sysutils/sysbuild package.  This unprivileged user is
automatically configured to perform daily NetBSD builds.

#! /bin/sh

EGDIR="@EGDIR@"
SYSBUILD_HOME="@SYSBUILD_HOME@"
SYSBUILD_USER="@SYSBUILD_USER@"

case "${STAGE}" in
    POST-INSTALL)
        if [ ! -e "${SYSBUILD_HOME}/.sysbuild/default.conf" ]; then
            echo "${PKGNAME}: Installing default configuration file"
	    ${MKDIR} -p "${SYSBUILD_HOME}/.sysbuild"
            ( cd "${SYSBUILD_HOME}/.sysbuild" && ln -s ../default.conf . )
        fi

        if crontab -u "${SYSBUILD_USER}" -l >/dev/null 2>/dev/null; then
            echo "${PKGNAME}: ${SYSBUILD_USER} already has a crontab;" \
	    	"not installing"
        else
            echo "${PKGNAME}: Installing default crontab for ${SYSBUILD_USER}"
            crontab -u "${SYSBUILD_USER}" "${EGDIR}/crontab"
        fi
        ;;
esac