#!/bin/sh
#
# Server-specific Solaris 8 Jumpstart post-install script.
# This script is called from the generic finish script, and carries
# out server-specific customizations.
#
# Revision History :
#
# 17-Sep-2001 - Scott Howard - Initial Version
#
#

#########################################################
echo "### Remove permissions from at and cron"
chmod 4700 /usr/bin/crontab
chmod 4700 /usr/bin/at


#########################################################
echo "### Enable DNS name resolution"
cat > /etc/resolv.conf <<EOF
search mydomain.com
nameserver 10.10.10.1
namserver 10.20.20.1
EOF
/usr/bin/perl -pe 's/^hosts:.*$/hosts:		nis dns files/' -i /etc/default/cron


#########################################################
echo "### Creating cachefs"
cfsadmin -c -o maxfilesize=50 /cachefs/cache


#########################################################
echo "### Limiting tmpfs filesystems to 500Mb each"
perl -pe 's/^(swap\s+-\s+\S+\s+tmpfs\s+-\s+yes\s+)-$/\1size=500M/' -i /etc/vfstab


#########################################################
echo "### Mounting /var/tmp on tmpfs"
echo "swap    -       /var/tmp        tmpfs   -       yes     size=500M" >> /etc/vfstab

#########################################################
echo "### Enabling 64 bit kernel"
/usr/bin/perl -pe 's/#(ALLOW_64BIT_KERNEL_ON_UltraSPARC_1_CPU=true)/\1/' -i /platform/sun4u/boot.conf
