Listing 3: initialize-client
#! /bin/sh
#
# initialize-client: Written 13APR95 by Michael Hill
# @(#) localize (standardize) a client's setup
#
PATH=/bin:/usr/bin:/usr/local/share/bin; export PATH
SHARE=/usr/local/share
OPENWINHOME=/usr/openwin
if [ $# -gt 0 ]; then
echo "usage: `basename $0`" >&2
exit 1
fi
mkdir -p /usr/local/bin
echo "Installing \c"
bashname=`basename $SHARE/bin/bash-*`
echo "$bashname\c"
cp $SHARE/bin/$bashname /usr/local/bin
rm -f /usr/local/bin/bash
ln -s $bashname /usr/local/bin/bash
cp $SHARE/bin/$bashname /usr/bin
rm -f /usr/bin/bash
ln -s $bashname /usr/bin/bash
perlname=`basename $SHARE/bin/perl?*`
echo ", $perlname\c"
cp $SHARE/bin/$perlname /usr/local/bin
rm -f /usr/local/bin/perl
ln -s $perlname /usr/local/bin/perl
echo ", sudo\c"
rm -f /usr/local/bin/sudo /etc/visudo
cp $SHARE/bin/sudo /usr/local/bin
cp $SHARE/etc/visudo /etc
if [ `uname -s` = SunOS ]; then
olvwmname=`basename $SHARE/bin/olvwm-*`
echo ", $olvwmname\c"
cp $SHARE/bin/$olvwmname $OPENWINHOME/bin
rm -f $OPENWINHOME/bin/olvwm
ln -s $olvwmname $OPENWINHOME/bin/olvwm
echo ", screenblank\c"
cp $SHARE/bin/screenblank /sbin
echo ", sendmail.cf\c"
cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig
cp $SHARE/etc/sendmail.cf /etc/mail/sendmail.cf
chown bin /etc/mail/sendmail.cf*
chgrp bin /etc/mail/sendmail.cf*
fi
echo "... done."
echo "Touching up /etc\c"
if [ -f /etc/init.d/screen ]; then
chmod 744 /etc/init.d/screen
ln -s ../init.d/screen /etc/rc2.d/S10screen
fi
if [ -f /etc/init.d/misc ]; then
chmod 755 /etc/init.d/misc
ln -s ../init.d/misc /etc/rc2.d/S95misc
fi
echo ", /var\c"
mkdir -p /var/spool/rwho
touch /var/log/syslog /var/log/sudolog /var/log/authlog
touch /var/log/maillog
echo "... done."
exit 0
# End of File
|