#!/bin/bash # Filname: ndsinstallv2.sh # Author: Luke Meijer # Replace the variables; SSPATH, EDPATH, DMPATH with your install file locations # Usage: installnds.sh [ -i ] # -i which interface for eDirectory to listen on INTERFACE=eth0 function usage() { echo -e "eDirectory for Linux install script. Usage: \n -i = Specify Interface, if left out defaults to eth0. \n" echo -e "If no options specified an 8.8.2 install with a temporary tree on eth0 will be performed. \n" exit } while getopts "i:" Option do case $Option in i ) shift;INTERFACE=$1;; * ) usage;; esac done EDIP=`ifconfig $INTERFACE | grep 'inet addr:' | cut -d: -f2 | awk '{print $1}'` if [[ -z $EDIP ]] then echo "Problem with defined Interface, use format eth(x) (e.g. eth0)" exit else echo "$EDIP will be used for eDirectory installation." fi #Security Services Installer Path ################################## SSPATH=/eDir/utils #eDirectory Installer Path ########################### EDPATH=/eDir/eDirectory/setup #dsrmenu.sh Path ################# DMPATH=/eDir/utils echo ". /opt/novell/eDirectory/bin/ndspath" > /etc/bash.bashrc.local cp $DMPATH/dsrmenu.sh /root/bin if [ ! -L /root/bin/dsrepair ] then ln -s /root/bin/dsrmenu.sh /root/bin/dsrepair fi $EDPATH/nds-install -u -c server -c admutils /opt/novell/eDirectory/bin/ndsconfig new -t $HOSTNAME-TREE -S $HOSTNAME -n ou=corp.o=org -a cn=admin.o=org -w password -B $EDIP@524 -D /eDir/$HOSTNAME -d /eDir/$HOSTNAME/data/dib --config-file /etc/opt/novell/eDirectory/conf/nds.conf /etc/init.d/ndsd stop $SSPATH/install.sh -q /etc/init.d/ndsd start ln -s /etc/opt/novell/nici.cfg /etc/nici.cfg echo -e "Installation completed. Please logout for PATH variable updates to take effect. \n"