#!/bin/sh # The log for this script will end up in /var/sadm/system/logs/finish.log # # Solaris 8 Server/Workstation Jumpstart post-install script. # # This script does all general modification (ie, those that apply to both # servers and workstations), and then calls scripts to carry out stuff # specifically for the type of machine being built. # # Revision History : # # 17-Sep-2001 - Scott Howard - Initial Version # # ######################################################### # Work out what type of machine we are # MACHINETYPE=`echo $SI_CLASS | cut -b 1-6` if [ "$MACHINETYPE" = "server" ]; then echo "##########################################" echo "### Starting Server Post-Install Scipt ###" echo "##########################################" elif [ "$MACHINETYPE" = "workst" ]; then echo "###############################################" echo "### Starting Workstation Post-Install Scipt ###" echo "###############################################" else echo "Unknown machine type (SI_CLASS is $SI_CLASS) - not running post install script" exit 0 fi # Set umask for all further operations umask 022 cd / # Remount mnttab /sbin/mount -F mntfs mnttab /etc/mnttab ######################################################### # Install any additional packages we want. Includes things like Solstice # DiskSuite and local packages such as OpenSSH. We pass in the type of # machine we are building so that it can decide what packages to install # based on the machine type. # echo "### Installing additional Packages" cd /mnt/doc/DOC_Packages ./install_packages $MACHINETYPE ######################################################## echo "### Installing Recommended Patches" cd /mnt/doc/patches ./apply_patches -q -nosave ######################################################### echo "### Installing leaf sendmail.cf file" cp -p /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig cp /mnt/doc/DOC_Other/sendmail.cf /etc/mail/sendmail.cf ######################################################### echo "### Adding customisations to root's .cshrc" cat > /.cshrc < /etc/issue <> /etc/motd ######################################################### echo "### Disabling cron logging" /usr/bin/perl -pe 's/YES/NO/' -i /etc/default/cron ######################################################### echo "### Removing SUID permissions on ufsdump/ufsrestore" chmod 555 /usr/lib/fs/ufs/ufsdump chmod 555 /usr/lib/fs/ufs/ufsrestore ######################################################### echo "### Turning on logging for all ufs filesystems" perl -pe 's/(\S+\s+\S+\s+\/\S*\s+ufs.*)-$/\1logging/' -i /etc/vfstab ######################################################### ######################################################### # Customizations specific to classes of machines # (ie, server v's workstation) # [ "$MACHINETYPE" = "server" ] && /mnt/doc/config_server [ "$MACHINETYPE" = "workst" ] && /mnt/doc/config_workst ######################################################### ######################################################### # Other stuff can go here... ######################################################### echo "### Done ###"