#!/bin/sh
################################################################################
# Domain Services for Windows Provisioning Tool
#
# See the file LICENSE for redistribution information.
#
# Copyright (c) 2001-2004
#	Novell, Inc.  All rights reserved.
################################################################################

PATH=/opt/novell/xad/sbin:/opt/novell/xad/bin:/opt/novell/xad/share/dcinit:$PATH
export PATH

_LIB=`/opt/novell/xad/share/dcinit/printConfigKey.pl "_Lib"`
export _LIB

LD_LIBRARY_PATH=/opt/novell/xad/$_LIB:/opt/novell/xad/$_LIB/nds-modules:/opt/novell/eDirectory/$_LIB:/opt/novell/eDirectory/$_LIB/nds-modules:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

SASL_PATH=/opt/novell/xad/$_LIB/sasl2
export SASL_PATH

PREFIX=/opt/novell/xad
DCINIT_CONFIG=/etc/opt/novell/xad/xad.ini

cd $PREFIX/share/dcinit

if test "X$1" = "X"; then
	echo "Usage: dcmake [targets]"
	echo "where [targets] is selected from:"
	echo "	all		restore directory to installation default"
	echo "			WARNING: will delete existing domain"
	echo "	install		make staging directory live"
	echo "	stage		generate configuration in staging directory"
	echo "	print_version	print framework build number"
	echo "	rebuild_config	rebuild configuration files"
	echo "	unconfig	delete domain configuration"
	exit 1
fi

make $*

