# $NetBSD: INSTALL,v 1.4 2023/04/05 09:16:42 adam Exp $
#
# Create default symlinks in ${PKG_SYSCONFDIR} for enabled modules/sites
#

SITES_ENABLED="default inner-tunnel"
MODS_ENABLED="always attr_filter chap date detail detail.log
	      digest dynamic_clients eap echo exec expiration expr
	      files linelog logintime mschap ntlm_auth pap passwd preprocess
	      radutmp realm replicate soh sradutmp totp unix unpack utf8"

case ${STAGE} in
POST-INSTALL)
	${ECHO} "Enabling default modules and sites"
	${LN} -sf ./mods-config/preprocess/hints @PKG_SYSCONFDIR@/hints
	${LN} -sf ./mods-config/preprocess/huntgroups @PKG_SYSCONFDIR@/huntgroups
	${LN} -sf ./mods-config/files/authorize @PKG_SYSCONFDIR@/users
	for s in ${SITES_ENABLED}; do
	    ${LN} -sf ../sites-available/${s} @PKG_SYSCONFDIR@/sites-enabled/${s}
	done
	for m in ${MODS_ENABLED}; do
	    ${LN} -sf ../mods-available/${m} @PKG_SYSCONFDIR@/mods-enabled/${m}
	done
	;;
esac
