LinuxMeister
setup of 700 series workstation
copyright © 2000 john meister
note: this configuration is no longer used (would update assigning VARIABLES to commands,
e.g. CP = /usr/bin/cp, etc. This script was used for years to build and manage a medium sized
engineering group. This script developed over time, pretty normal, a good reason to start out
with a good template, defining command variables and so on. But it worked very well.
#!/bin/sh
# creation date: December 24, 1998 # updated: Feburary 26, 1999
# author: John Meister # filename: setsys
# (to update a workstation use: updatesys)
#
# file location: /disks/drive2/sa/build/setup/setsys
#
# ========================================================================
# To build an HP workstation: (1999 John Meister)
# ========================================================================
#
#
# COPYRIGHT 1997-2000 JOHN MEISTER
#
#
# summary:
#
# /----------------------------------------------------------------------------------\
# | initial load of operating system ________ |
# | log in as root, setup root, ftp files, setsys ________ |
# | |
# | REBOOT |
# | |
# | add printers, tweak kernel (dbc_max_pct, maxdsiz, maxtsiz) _______ |
# | |
# | REBOOT |
# \__________________________________________________________________________________/
#
#
# 1) mount the 10.20.ACE CD (for 700 series use the standard install CD)
# power off, attach CD, power up, press escape to stop boot
#
# 2) boot from the CD (b p1)
# search for drive,
# boot from CD: "b p1" or "b scsi.2.0"
# (no interact w/ipl, install HP-UX, enable network, No Home Directory)
# (NO DHCP, PS2_DIN... English (number 45), Load (ACE only) 10.20.S/W enhancements)
#
# 3) set the ip address:
# hostip: 192.168.16.___
# gateway: 192.168.0.1 gaterd
# subnet mask: 255.255.0.0
#
# 4) set the filesystems for a 2 gig drive as follows:
# LVM with VxFS:
# REDUCE /opt 148m
# INCREASE /tmp 176m
# INCREASE /var 332m
#
# 5) after loading system, answer questions, careful to check the time
#
# 6) mkdir /root/home, cd /root/home
# vi /etc/passwd - add /root/home
# mv /.* /root/home
#
# 7) ftp from server1
# server1:/disks/drive2/sa/build/setup "dt.tar, checklst and setsys"
#
# 8) setup root's account
# rm -rf .dt
# tar xvf dt.tar
# ./setsys
# REBOOT
#
# 9) enter SAM, setup printers, then "tweak kernel":
# setup dj750 and a local printer (be sure to use bsd and laserjet)
# Add Remote Printer/Plotter Remote System Name: jupiter
# SET TO BSD, rcmodel / rsmodel, Allow Cancel, make laserjet default
# be sure to add default printer with name and laserjet
#
# CONFIGURABLE PARAMETERS
#
# dbc_max_pct: reduce from 50 to 10%
# maxdsiz: set to (750*1024*1024)
# maxtsiz: set to 96000000 (for pro/e)
#
# CREATE NEW KERNEL AND REBOOT
#
# 10) after verfiying setup, enter sam, find Patch Depot on wagoneer and patch
# wagoneer:/wagoneer/DEPOT-CDE then wagoneer:/wagoneer/DEPOT
#
#
##################################################################################
/usr/bin/echo "setsys started"
/usr/bin/mkdir /root/home/setup
/usr/bin/mv /.v* /root/home
/usr/bin/mv /.p* /root/home
/usr/bin/mv /.s* /root/home
/usr/bin/mv /.X* /root/home
/usr/bin/mv /.d* /root/home
touch /root/home/setup/testlog.`date +'%y%m%d-%H'`
/usr/bin/echo "# =======================================" \
>> /root/home/setup/testlog.`date +'%y%m%d-%H'`
/usr/bin/date | /usr/bin/tee -a /root/home/setup/testlog.`date +'%y%m%d-%H'`
/usr/bin/uname -a | /usr/bin/tee -a /root/home/setup/testlog.`date +'%y%m%d-%H'`
/usr/bin/echo "# =======================================" \
>> /root/home/setup/testlog.`date +'%y%m%d-%H'`
if [ ! -d /disks/01a ]
then
/usr/bin/mkdir /usr/plots
/usr/bin/mkdir /disks
/usr/bin/mkdir /disks/01a
/usr/bin/mkdir /disks/01b
/usr/bin/mkdir /disks/01c
/usr/bin/mkdir /disks/01d
/usr/bin/mkdir /disks/02a
/usr/bin/mkdir /disks/02b
/usr/bin/mkdir /disks/02c
/usr/bin/mkdir /disks/drive2
/usr/bin/mkdir /disks/03a
/usr/bin/mkdir /disks/03b
/usr/bin/mkdir /disks/03c
/usr/bin/mkdir /disks/03d
/usr/bin/mkdir /disks/04a
/usr/bin/mkdir /disks/04b
/usr/bin/mkdir /disks/04c
/usr/bin/mkdir /disks/04d
/usr/bin/echo "directories made"
fi
/usr/sbin/mount server1:/disks/drive2 /disks/drive2
/usr/bin/bdf | /usr/bin/grep disks/drive2
if [ ! ? ]
then
echo "MOUNT FAILED"
/usr/bin/echo " ################################################################ "
echo "press to continue, ctrl c to exit"
/usr/bin/echo " IF NOT CONNECTED TO RAID THIS SCRIPT WILL FAIL AT THIS POINT!!!"
/usr/bin/echo " ################################################################# "
read $answer1
/usr/sbin/mount server1:/disks/drive2 /disks/drive2
fi
/usr/bin/cat /disks/drive2/sa/build/setup/rootprofile >> /root/home/.profile
if [ ! -f /etc/fstab.orig ]
then
/usr/bin/cp /etc/fstab /root/home/setup/fstab.orig
/usr/bin/cp /etc/fstab /etc/fstab.orig
fi
/usr/bin/echo "# =========== nfs mounts added =========" >> /etc/fstab
/usr/bin/cat /disks/drive2/sa/build/setup/checklst >> /etc/fstab
/usr/bin/cp /etc/fstab /root/home/setup/fstab.`date +'%y%m%d-%H'`
/usr/bin/cp /etc/fstab /etc/fstab.`date +'%y%m%d-%H'`
/etc/mount -a
# test mounting of filesystems
/usr/bin/bdf | /usr/bin/tee -a /root/home/setup/testlog.`date +'%y%m%d-%H'`
# IF NOT CONNECTED TO RAID THIS SCRIPT WILL FAIL AT THIS POINT!!!
/usr/bin/cp /etc/hosts /root/home/setup/hosts.orig
/usr/bin/cp /etc/hosts /etc/hosts.orig
/usr/bin/cat /disks/drive2/sa/build/setup/hostsadd >> /etc/hosts
/usr/bin/cp /etc/hosts /root/home/setup/hosts.`date +'%y%m%d-%H'`
/usr/bin/cp /etc/hosts /etc/hosts.`date +'%y%m%d-%H'`
# create links for SolidDesigner
# creating lib700 links to make Solid Designer work
if [ ! -d /usr/PE ]
then
/usr/bin/mkdir /usr/PE
fi
if [ ! -d /opt/CoCreate ]
then
/usr/bin/mkdir /opt/CoCreate
fi
if [ ! -h /usr/PE/lib700 ]
then
/usr/bin/ln -s /disks/04d/MCAD-apps/lib700 /usr/PE/lib700
fi
if [ ! -h /opt/CoCreate/lib700 ]
then
/usr/bin/ln -s /disks/04d/MCAD-apps/lib700 /opt/CoCreate/lib700
fi
# setting up DNS, sendmail and name resolution
/usr/bin/cp /disks/drive2/sa/build/setup/nsswitch.conf /etc/nsswitch.conf
/usr/bin/cp /disks/drive2/sa/build/setup/resolv.conf /etc/resolv.conf
/usr/bin/cp /disks/drive2/sa/build/setup/sendmail.cf /etc/mail/sendmail.cf
# configure CDE - make copies of original files
/usr/bin/cp /disks/drive2/sa/build/setup/PATH /etc/PATH
/usr/bin/cp /etc/rc.config.d/list_mode /root/home/setup/list_mode.orig
/usr/bin/cp /disks/drive2/sa/build/setup/list_mode /etc/rc.config.d/list_mode
# set up new files
/usr/bin/cp /disks/drive2/sa/build/setup/sys.resources /etc/dt/config/C/sys.resources
/usr/bin/cp /disks/drive2/sa/build/setup/sys.resources /root/home/setup/sys.resources-etcdtconfigC
/usr/bin/cp /disks/drive2/sa/build/setup/sys.dtwmrc /etc/dt/config/C/sys.dtwmrc
/usr/bin/cp /disks/drive2/sa/build/setup/sys.dtwmrc /root/home/setup/sys.dtwmrc-etcdtconfigC
/usr/bin/cp /disks/drive2/sa/build/setup/0010.sourceprofile /etc/dt/config/Xsession.d/
/usr/bin/cp /disks/drive2/sa/build/setup/0010.sourceprofile /root/home/setup/0010.sourcep-Xsession.d-etcdtconfig
# add Xconfig file to prevent from losing MIT-MAGIC COOKIE
# if this file is missing it will cause login problems and X related issues
/usr/bin/echo "Dtlogin*authorize: False" > /etc/dt/config/Xconfig
/usr/bin/cp /etc/dt/config/Xconfig /root/home/setup/Xconfig-etcdtconfig
/usr/bin/chmod 444 /etc/dt/config/Xconfig
# etc files - motd and shells
/usr/bin/cp /disks/drive2/sa/build/setup/motd /etc/motd
/usr/bin/cp /disks/drive2/sa/build/setup/motd /root/home/setup/motd
/usr/bin/cp /disks/drive2/sa/build/setup/shells /etc/shells
/usr/bin/cp /disks/drive2/sa/build/setup/shells /root/home/setup/shells
/usr/bin/cp /etc/csh.login /etc/csh.login.orig
/usr/bin/echo "# " >> /etc/csh.login
/usr/bin/echo "set autologout = 0" >> /etc/csh.login
/usr/bin/cp /etc/csh.login /root/home/setup/csh.login.`date +'%y%m%d-%H'`
/usr/bin/cp /etc/profile /etc/profile.orig
/usr/bin/cp /etc/profile /root/home/setup/profile.orig
/usr/bin/cat /disks/drive2/sa/build/setup/etcprofile >> /etc/profile
/usr/bin/cp /etc/profile /root/home/setup/profile.`date +'%y%m%d-%H'`
/usr/bin/cp /disks/drive2/sa/build/setup/nloservers.txt /etc/nloservers.txt
/usr/bin/cp /disks/drive2/sa/build/setup/pro19 /root/home/setup/pro19-links
# NOTE: links are already in the /disks/04d/MCAD-apps/bin directory
############## ##############
# NIS setup - passwd - group
############## ##############
/usr/bin/cp /etc/passwd /etc/passwd.orig
/usr/bin/cp /etc/passwd /etc/passwd.`date +'%y%m%d-%H'`
/usr/bin/grep 60001 /etc/passwd
if [ ? ]
then
/usr/bin/echo "+::-2:60001:::" >> /etc/passwd
echo "passwd is now set for NIS"
fi
/usr/bin/grep 60001 /etc/passwd
if [ ! ? ]
then
echo "passwd was set to NIS already, no change"
fi
/usr/bin/cp /etc/passwd /root/home/setup/passwd.`date +'%y%m%d-%H'`
if [ ! -f /etc/group.orig ]
then
/usr/bin/cp /etc/group /etc/group.orig
fi
/usr/bin/grep "+:*:*" /etc/group
if [ ? ]
then
/usr/bin/echo "+:*:*" >> /etc/group
echo "group is now set for NIS"
fi
/usr/bin/cp /etc/group /etc/group.`date +'%y%m%d-%H'`
/usr/bin/cp /etc/group /root/home/setup/group.`date +'%y%m%d-%H'`
/usr/bin/grep "+:*:*" /etc/group
if [ ! ? ]
then
echo "group is already set for NIS, no change"
fi
############## ##############
# ports for SD Help and SAP (in NIS, this is a failover feature)
############## ##############
if [ ! -f /etc/services.orig ]
then
/usr/bin/cp /etc/services /etc/services.orig
fi
/usr/bin/cp /etc/services /etc/services.`date +'%y%m%d-%H'`
/usr/bin/grep sdhelp /etc/services
if [ ? ]
then
/usr/bin/echo "sdhelp 2308/tcp #sdhelp for SolidDesigner" >> /etc/services
fi
/usr/bin/grep sapdp00 /etc/services
if [ ? ]
then
/usr/bin/echo "sapdp00 3200/tcp # for SAP " >> /etc/services
fi
############## ##############
# bigbrother setup
############## ##############
if [ ! -f /sbin/init.d/bigbrother ]
then
/usr/bin/cp /disks/drive2/sa/build/setup/bigbrother /sbin/init.d/bigbrother
/usr/bin/chmod 755 /sbin/init.d/bigbrother
/usr/bin/ln -s /sbin/init.d/bigbrother /sbin/rc3.d/S911bigbrother
fi
/usr/bin/echo " ##################################################################"
/usr/bin/echo " initial install and setup done, continue: "
/usr/bin/echo " REBOOT, set printers - Kernel, REBOOT, install patches, TEST"
/usr/bin/echo " ################################################################## "
/usr/bin/echo " this file last updated February 26, 1999 John Meister"
/usr/bin/echo " ################################################################## "
#
# ==============================================================
# DEFAULT FILESYSTEM action VALUE
# ==============================================================
# (84M) / = 84M
# (48M) /stand = 48M
# (pri swap) = 512M
# (sec swap) = 400M
# (252M) /opt REDUCE to = 148M
# (32M) /tmp INCREASE to = 172M
# (332M) /usr = 332M
# (160M) /var INCREASE to = 332M
# =============================================================
# note: maxdsiz (Max Data Segment: 67108864 changes to 78643200)
# maxtsiz (Max Text Segment: 67108864 changes to 960000)
#
|