SUMMARY: Solaris 2.5.1 JumpStart

Jeffrey Liu (jliu@eur.ericsson.com)
Tue, 08 Apr 1997 10:27:05 -0700

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: quoted-printable
Content-MD5: 1PowMLBIAuc+4g4Emw0VbQ==
X-Sun-Data-type: text

Hi,

I've received many replies. I attach several answers for reference.
To make your own finish script, only customized change are needed for =
your=20
company's environment.
=20
I appreciate your kindly help.

Jeffrey

------------- Begin Forwarded Message -------------

=46rom sun-managers-relay@ra.mcs.anl.gov Wed Apr 2 15:28:35 1997
Date: Wed, 2 Apr 1997 14:25:36 -0800
From: jliu@eur.ericsson.com (Jeffrey Liu)
To: sun-managers@eecs.nwu.edu
Subject: Solaris 2.5.1 JumpStart
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Md5: hhEooRL/oc8qijzWXVqjvg=3D=3D

Hi,

I'm setup a Solaris 2.5.1 JumpStart Server.
I've successfull netinstalled OS, but
I had problem to create a finish script to install
following software packages:
1. CDE
2. SSPC
3. 2.5.1_Recommended patches

If you have a working script, can you please forward to me?

Thanks,

Jeffrey

------------- End Forwarded Message -------------

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ)
Content-type: MESSAGE/RFC822
Content-description: jumpstart1
Content-MD5: ER46sN8d63tWfwANtJSiFQ==
X-Sun-Data-type: mail-message

Received: from eur.ericsson.se (dublin) by rides (4.1/SMI-4.1) id AA12682; Thu,
3 Apr 97 01:26:58 PST
Received: from mr2.exu.ericsson.se by eur.ericsson.se (8.6.12/EUR-Dublin)
id BAA04500; Thu, 3 Apr 1997 01:32:14 -0800
Received: from gwa.ericsson.com (gwa.exu.ericsson.se [138.85.147.13])
by mr2.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with ESMTP id DAA12318 for
<jliu@eur.ericsson.se>; Thu, 3 Apr 1997 03:30:27 -0600 (CST)
Received: from gatekeeper.liffe.com (gatekeeper.liffe.com [156.48.254.3])
by gwa.ericsson.com (8.8.2/8.8.2) with SMTP id DAA08983 for
<jliu@eur.ericsson.com>; Thu, 3 Apr 1997 03:30:25 -0600 (CST)
Received: from arnie.liffe.com by gatekeeper.liffe.com
(8.6.11/liffe-1.11-server) id KAA07260; Thu, 3 Apr 1997 10:31:06 +0100
Received: from sstest.liffe.com by arnie.liffe.com (8.6.11/liffe-1.6-server)
id KAA28546; Thu, 3 Apr 1997 10:29:46 +0100
Received: by sstest.liffe.com (SMI-8.6/liffe.com-1.1-client) id KAA02346; Thu,
3 Apr 1997 10:25:24 +0100
Date: Thu, 3 Apr 1997 10:25:24 +0100
From: mjb@liffe.com
Subject: Re: Solaris 2.5.1 JumpStart
To: jliu@eur.ericsson.se
Message-id: <199704030925.KAA02346@sstest.liffe.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-MD5: YTD2rdiAcCcoa+ECXWjyJg==
Content-length: 2244
>From mjb@liffe.com Thu Apr 3 01:26:58 1997

Hi,
For your CDE:

pkgadd -d /tmp/install_config/CDE/cde-min -R /a SUNWdticn

cd /tmp/install_config/CDE/CDE-min

pkgadd -d . -R /a /SUNWdtbas <<EOF
y
y
y
EOF

rm -rf /a/usr/SUNWdtbas

pkgadd -d /tmp/install_config/CDE/cde-min -R /a SUNWdtdmn

pkgadd -d /tmp/install_config/CDE/cde-min -R /a SUNWdtdte <<EOF
y
y
y
EOF

pkgadd -d /tmp/install_config/CDE/cde-min -R /a SUNWdtft

pkgadd -d /tmp/install_config/CDE/cde-end-user -R /a SUNWdtdst <<EOF
y
EOF

for f in dthe dthev dtim dtreme dtwm
do
pkgadd -d /tmp/install_config/CDE/cde-end-user -R /a SUNW${f}
done
#
# Enable CDE dtlogin environment
#
chroot /a /usr/dt/bin/dtconfig -e
chroot /a /usr/dt/bin/dtconfig -reset

# Make sure you have patches installed and unarchived on disk on some
# remote host
#
mount -F nfs -o rw patchhost:/dir_path/Patches /a/mnt
/a/mnt/Install_Patches

You need to create a file called Patch_list at the same level as where
Install_Patches is on the server. Type in the patch number and revision
for every patch you want installed on install client e.g.
103187-0
103188-09
103368-04
...

The Install_patches should have the following in it:
#!/bin/sh
cd /a/mnt
PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:.
export PATH
for f in `cat ./Patch_List`
do
cd ${f}
./installpatch -R /a -u -d .
cd ..
done

# End of Install_Patches script

There you are, any help, just contact me.

Michael Bennett
London International Financial Futures & Options Exchange
Michael.Bennett@liffe.com

I always know something you don't, but then again, it could be said likewise!

> From sun-managers-relay@ra.mcs.anl.gov Thu Apr 3 00:45 BST 1997
> Date: Wed, 2 Apr 1997 14:25:36 -0800
> From: jliu@eur.ericsson.com (Jeffrey Liu)
> To: sun-managers@eecs.nwu.edu
> Subject: Solaris 2.5.1 JumpStart
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Md5: hhEooRL/oc8qijzWXVqjvg==
>
> Hi,
>
> I'm setup a Solaris 2.5.1 JumpStart Server.
> I've successfull netinstalled OS, but
> I had problem to create a finish script to install
> following software packages:
> 1. CDE
> 2. SSPC
> 3. 2.5.1_Recommended patches
>
> If you have a working script, can you please forward to me?
>
> Thanks,
>
> Jeffrey

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ)
Content-type: MESSAGE/RFC822
Content-description: jumpstart2
Content-MD5: +qZitIjQDcexz/09S64pRg==
X-Sun-Data-type: mail-message

Received: from eur.ericsson.se (dublin) by rides (4.1/SMI-4.1) id AA13883; Thu,
3 Apr 97 04:39:55 PST
Received: from mr2.exu.ericsson.se by eur.ericsson.se (8.6.12/EUR-Dublin)
id EAA07486; Thu, 3 Apr 1997 04:45:11 -0800
Received: from gwa.ericsson.com (gwa.exu.ericsson.se [138.85.147.13])
by mr2.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with ESMTP id GAA16396 for
<jliu@eur.ericsson.se>; Thu, 3 Apr 1997 06:43:24 -0600 (CST)
Received: from gatekeeper.ray.com (gatekeeper.ray.com [138.125.162.1])
by gwa.ericsson.com (8.8.2/8.8.2) with ESMTP id GAA13035 for
<jliu@eur.ericsson.com>; Thu, 3 Apr 1997 06:43:22 -0600 (CST)
Received: (mailer@localhost) by gatekeeper.ray.com (8.7.5/8.7.3)
id HAA04245 for <jliu@eur.ericsson.com>; Thu, 3 Apr 1997 07:44:06 -0500
Received: from slpma8.ed.ray.com by gatekeeper.ray.com; Thu Apr 3 07:43:08 1997
Received: from slpmai.ED.RAY.COM (SLPMAI.ED.RAY.COM [138.125.33.127])
by slpma8.ed.ray.com (8.8.2/8.8.2) with SMTP id HAA29785 for
<jliu@eur.ericsson.com>; Thu, 3 Apr 1997 07:44:58 -0500 (EST)
Received: by slpmai.ED.RAY.COM (SMI-8.6/SMI-SVR4) id HAA01052; Thu,
3 Apr 1997 07:43:13 -0500
Date: Thu, 3 Apr 1997 07:43:13 -0500
From: cwarner@slpma8.ed.ray.com (Caleb Warner)
Subject: Re: Solaris 2.5.1 JumpStart
To: jliu@eur.ericsson.se
Message-id: <199704031243.HAA01052@slpmai.ED.RAY.COM>
MIME-version: 1.0
Content-type: MULTIPART/MIXED; BOUNDARY="Boundary_(ID_B6zFaGS6CoPbVvOzIfIZ4w)"
Content-length: 11307
>From cwarner@slpma8.ed.ray.com Thu Apr 3 04:39:55 1997

--Boundary_(ID_B6zFaGS6CoPbVvOzIfIZ4w)
Content-type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=text
Content-description: text
Content-disposition: ATTACHMENT; FILENAME=text
X-Sun-Charset: us-ascii

I have enclosed a finish script which installs packages and the patches.
Let me know if you have any questions

Thanks
Caleb Warner
Raytheon Company
cwarner@ed.ray.com

--Boundary_(ID_B6zFaGS6CoPbVvOzIfIZ4w)
Content-type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=int.finish.fdd_cmd
Content-description: shell-script
Content-disposition: ATTACHMENT; FILENAME=int.finish.fdd_cmd
X-Sun-Charset: us-ascii
X-Sun-Data-type: shell-script

#!/bin/sh
#
# finish
#
###########################################################################
#
# This version of the finish script is specific to the FDD'S and CMD'S
#
# CMD specifics include:
# X11R5
# IXImd12s
#
###########################################################################

set -x

# Environment Settings"
if [ -d /a ]
then
B=/a
D=/tmp/install_config/int/os2.5
SERVER_JUMPSTART=`egrep cdrom /etc/mnttab | cut -f1 -d':'`
else
B=/
D=/jumpstart/int/os2.5
SERVER_JUMPSTART=adats1

SI_CONFIG_DIR=/jumpstart
# if [ ! -d /add_ons ]
# then
# mkdir /add_ons
# mount -r -F nfs ${SERVER_JUMPSTART}:/add_ons /add_ons
# fi
fi

echo "MACHINE: `uname -n`"
echo "JUMPSTART SERVER = $SERVER_JUMPSTART"
echo "ROOT DIRECTORY = $B"
echo "JUMPSTART CONIFGURATION DIRECTORY = $D"
echo

echo "---------------------------------------------------------------------"
echo "Solaris 2.5.1 Installation Parameters"
cat $D/int.prof
echo "---------------------------------------------------------------------"
echo

#############################################################################
#
# Make system specific changes
#
#############################################################################

# Set the root passwd
#
# THIS IS NOT NECESSARY FOR ADATS WE COPY IN A MASTER PASSWD FILE
#
# echo "Setting root password ..."
# PASSWD=WUQ6XI7pbxmzg
# mv $B/etc/shadow $B/etc/shadow.orig
# sed -e "s/root::6445:/root:$PASSWD:6445:/" $B/etc/shadow.orig > $B/etc/shadow

# set the flag so sysidroot won't prompt for the root password
#
# REQUIRED FOR ALL ADATS MACHINES
#
echo "Removing prompt for root password at boot time ..."
sed -e 's/0 # root/1 # root/' ${SI_SYS_STATE} > /tmp/state.$$
mv /tmp/state.$$ ${SI_SYS_STATE}
rm -f $B/etc/shadow.orig

# Allow remote root login
#
# REQUIRED FOR ALL ADATS MACHINES
#
echo "Allowing remote root logins ..."
cp $B/etc/default/login $B/etc/default/login.orig
sed 's/^CONSOLE/#CONSOLE/' $B/etc/default/login.orig > $B/etc/default/login
rm -f $B/etc/default/login.orig

# Allow tftp
#
# REQUIRED FOR RDP TO LOAD UCONX BOXES
#
# echo "Allowing tftp ..."
# cp $B/etc/inetd.conf $B/etc/inetd.conf.orig
# sed 's/#tftp/tftp/' $B/etc/inetd.conf.orig > $B/etc/inetd.conf
# rm -f $B/etc/inetd.conf.orig

# Allow remote root rsh, and backups to run
#
# NOT USED IN ADATS, WE ARE MORE LIBERAL! (SECURITY WE DON'T NEED NO STINK'IN SECURITY)
#
# echo "+ root" > $B/.rhosts

# Allow everyone to rsh to machine
#
# REQUIRED FOR ALL ADATS MACHINES
#
echo "Allowing all rsh sessions to machine ..."
echo "+ +" > $B/.rhosts
# Change permissions on /.rhosts
chmod 644 $B/.rhosts

# Remove ttdbserv
#
# REQUIRED FOR ALL ADATS MACHINES
#
echo "Removing ttdbserv startup ..."
cp $B/etc/inet/inetd.conf $B/etc/inet/inetd.conf.orig
sed 's/^100083/#100083/' $B/etc/inet/inetd.conf.orig > $B/etc/inet/inetd.conf
rm -f $B/etc/inet/inetd.conf.orig

# Change root shell from bourne to c-shell
#
# REQUIRED FOR ALL ADATS MACHINES
#
echo "Changing root shell to C-shell ..."
cp $B/etc/passwd $B/etc/passwd.orig
sed 's/\/sbin\/sh/\/usr\/bin\/csh/' $B/etc/passwd.orig > $B/etc/passwd
rm -f $B/etc/passwd.orig

# Disable Routing
#
# REQUIRED FOR ALL ADATS MACHINES BUT CERTAIN SDD'S
#
echo "Disabling routing ..."
touch $B/etc/notrouter

# Install ADATS Custom files from jumpstart server
#
echo "Installing ADATS custom files ... "
mount 138.125.60.1:/local1/jumpstart/int/reloc /mnt

#
# This line allows to copy all files in the $D/../reloc file with no comments in the 'finish.log' file
# NOT USED BY ADATS
#
# (cd /mnt; tar cf - . ) | (cd $B/; tar xBpf - )

#
# REQUIRED FOR ALL ADATS MACHINES
# custom group file (for autosu)
# custom hosts file (might need to change per site or something)
# custom passwd file (int account, psl account)
# custom shadow file (int passwd,root passwd,psl passwd)
# custom system file (shared memory settings) (may be different for SDDs?)
# custom S20system file (enable savecore feature)
# custom S98ADATS_net_custom file (Change UDP Settings)
# custom PPP files (The custom ppp files in the /etc/ppp directory)
echo "Installing ADATS custom files: group hosts passwd shadow system "
echo " rc2.d/S20system rc2.d/S98adats_net_custom"
echo " ppp files"
(cd /mnt/etc; tar cf - .) | (cd $B/etc;tar xBpf - )

#
# NOT REQIRED FOR CODE COMPILED UNDER 2.5
#
# NOT REQURIED FOR RDPS'S
#
# echo "Installing ADATS custom files: IXImd12s"
# (cd /mnt/local;tar cf - IXImd12s) | (cd $B/local;tar xBpf -)

#
# REQUIRED FOR ALL ADATS MACHINES (or Wassim will kill me)
#
echo "Installing ADATS custom files: emacs"
# (cd /mnt/local;tar cf - bin) | (cd $B/local;tar xBpf -)
# (cd /mnt/local;tar cf - lib) | (cd $B/local;tar xBpf -)

#
# REQUIRED FOR ALL ADATS MACHINES (like we could run without int!)
#
echo "Installing ADATS custom files: /local/users/int"
(cd /mnt/local;tar cf - users) | (cd $B/local;tar xBpf -)

#
# REQUIRED FOR ALL CODE COMPILED UNDER 2.5
#
#
(cd /usr/openwin/lib
for file in `ls lib*`
do
ln -s /usr/openwin/lib/$file $B/usr/lib/$file
done
)
(cd /usr/dt/lib
for file in `ls lib*`
do
ln -s /usr/dt/lib/$file $B/usr/lib/$file
done
)
#
# REQUIRED FOR ALL ADATS MACHINES
# GIVES US new_bx, traceroute, top, autosu
#
echo "Installing ADATS custom files: /usr/local"
(cd /mnt/usr;tar cf - local) | (cd $B/usr;tar xBpf -)

#
# REQUIRED FOR LARGE BARCO DISPLAYS ONLY
#
# echo "Installing ADATS custom files: BIT3 Driver files"
# (cd /mnt/dev;tar cf - .) | (cd $B/dev;tar xBpf -)
# cp /mnt/kernel/drv/bts $B/kernel/drv/bts
# cp /mnt/usr/include/sys/btio.h $B/usr/include/sys/btio.h
# cp /mnt/usr/include/sys/btsio.h $B/usr/include/sys/btsio.h
# (cd /mnt/local;tar cf - 944) | (cd $B/local;tar xBpf -)

#
# REQUIRED FOR RDP'S, AIS ONLY However copying to all files
#
echo "Installing ADATS custom files: PPP"
(cd /mnt/opt;tar cf - .) | (cd $B/opt;tar xBpf - )

#
# REQUIRED FOR RDP'S ONLY
#
# echo "Installing ADATS custom files: UconX"
# (cd /mnt/usr;tar cf - .) | (cd $B/usr;tar xBpf - )

umount /mnt

# Change ownership of int directory
#
# REQUIRED FOR ALL ADATS WORKSTATIONS
#
echo "Changing ownership of int account ..."
chown -R int $B/local/users/int

# Create links required
#
# SHOULD NOT BE NEEDED ONCE FINIAL TRANSITION TO 2.5 IS DONE
#
# NOT NEEDED FOR RDPS'S
#
echo "Creating necessary symbolic links for X11 (backwards compatability 2.3) ..."
ln -s /usr/openwin/bin $B/usr/bin/X11
ln -s /usr/openwin/lib $B/usr/lib/X11

#
# SHOULD NOT BE NEEDED ONCE FINIAL TRANSITION TO 2.5 IS DONE
#
# NOT NEEDED FOR RDPS'S
#

# echo "Creating necessary symbolic links for Motif (backwards compatability 2.3) ..."
# ln -s /local/IXImd12s $B/opt/IXImd12s
# ln -s /usr/lib $B/lib

#
# NEEDED BY ALL ADATS WORKSTATIONS FOR EMACS
#
echo "Create necessary symbolic links for /usr/local/lib ..."
ln -s /local/lib $B/usr/local/lib

#
# NEEDED BY LARGE SCREEN BARCOS ONLY
#
# echo "Create necessary symbolic links for BARCO Drivers ..."
# ln -s /local/955 $B/usr/local/944

#
# NEEDED BY RDPS'S ONLY
#
# echo "Create necessary symbolic links for UconX ..."
# ln -s /usr/UconX_no_ints $B/usr/UconX

# Add packages from remote servers

mount 138.125.60.1:/local1 /mnt

prtconf | egrep "csfour|cseight"
if [ $? -eq 0 ]
then
echo "Installing the AURORA Packages"
pkgadd -a /mnt/packages/noask_pkgadd -d /mnt/packages -r /mnt/packages/AURAcs.resp -R $B AURAcs
fi

#
# REQUIRED BY ALL ADATS WORKSTATIONS
#
# Add patches
echo "Installing patches ..."
$SI_CONFIG_DIR/int/add_patch.fin \
138.125.60.1:/local1/patches/patches_2.5.1 patches.2.5.1

#
# STARS LEFTOVER CODE. WE MAY USE AT SOME TIME (HEADLESS MACHINES?)
#
# Setup EEPROM
# if [ -f $D/files/eeprom.data ]
# then
# eeprom - < $D/files/eeprom.data
# fi

#
# STARS LEFTOVER CODE
#
# Setup crontab
# if [ -f $D/files/crontab.data ]
# then
# crontab $D/files/crontab.data
# fi

#
# REQUIRED BY ALL ADATS MACHINES
#
# Update /etc/rc2.d files
echo "Updating rc2.d files ..."
cd $B/etc/rc2.d

#echo " moving S30sysid.net"
#mv S30sysid.net s30sysid.net
#echo " moving S71sysid.sys"
#mv S71sysid.sys s71sysid.sys
echo " moving S72autoinstall"
mv S72autoinstall s72autoinstall
echo " moving S80PRESERVE"
mv S80PRESERVE s80PRESERVE
echo " moving S92volmgt"
mv S92volmgt s92volmgt
echo " moving S88sendmail"
mv S88sendmail s88sendmail
#mv S74syslog s74syslog
#echo " moving S72inetsvc"
#mv S72inetsvc s72inetsvc

#
# REQUIRED BY ALL ADATS MACHINES EXCEPT DMS? AND SMF?
#
# Update /etc/rc3.d files
echo "Updating rc3.d files ..."
cd $B/etc/rc3.d

echo " moving S16nfs.server"
mv S15nfs.server s15nfs.server

#
# REQUIRED FOR ALL ADATS WORKSTATIONS
#
# Setup 2nd and 3rd interface

echo "Setting up second interface ..."
dmesg | grep "^le0"
if [ $? -eq 0 ]
then
echo "`uname -n`-2" >$B/etc/hostname.le1
fi

dmesg | grep "^le1"
if [ $? -eq 0 ]
then
echo "`uname -n`-3" >$B/etc/hostname.le1
fi

#
# REQUIRED FOR ALL ADATS WORKSTATIONS
#
# Disable NIS
echo "Disabling NIS ..."
echo " Moving defaultdomain"
mv $B/etc/defaultdomain $B/etc/defaultdomain.orig
echo " Installing default nsswitch.conf file"
cp $B/etc/nsswitch.files $B/etc/nsswitch.conf

#
# REQUIRED FOR LARGE BARCOS ONLY
#
# Install BIT3 Drivers
# echo "Install BIT3 Driver for the VME Card ..."
# grep -s "type=ddi_pseudo;name=BIT3,bts" /etc/devlink.tab
# if [ $? -eq 1 ]
# then
# echo "type=ddi_pseudo;name=BIT3,bts \M0" >> $B/etc/devlink.tab
# fi
#
# grep -s "forceload: drv.bts" /etc/system
# if [ $? -eq 1 ]
# then
# echo "forceload: drv.bts" >> $B/etc/system
# fi
#
# add_drv -m "\"* 066 root sys\"" -i "\"BIT3,bts bts\"" -b $B

#
# REQUIRED FOR RDPS'S ONLY
#
# Add line to /etc/services for UconX
echo "Updating /etc/services file for the UconX ..."
grep -s "mps" /etc/services
if [ $? -eq 1 ]
then
echo "mps 5000/tcp" >> $B/etc/services
fi

# Add the motd
# ${SI_CONFIG_DIR}/scripts/add_motd.fin

--Boundary_(ID_B6zFaGS6CoPbVvOzIfIZ4w)--

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ)
Content-type: MESSAGE/RFC822
Content-description: jumpstart3
Content-MD5: ijiI3+iWt4VvDy0xiARqdg==
X-Sun-Data-type: mail-message

Received: from eur.ericsson.se (dublin) by rides (4.1/SMI-4.1) id AA13945; Thu,
3 Apr 97 05:36:46 PST
Received: from mr2.exu.ericsson.se by eur.ericsson.se (8.6.12/EUR-Dublin)
id FAA10987; Thu, 3 Apr 1997 05:42:03 -0800
Received: from gwa.ericsson.com (gwa.exu.ericsson.se [138.85.147.13])
by mr2.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with ESMTP id HAA19071 for
<jliu@eur.ericsson.se>; Thu, 3 Apr 1997 07:40:16 -0600 (CST)
Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93])
by gwa.ericsson.com (8.8.2/8.8.2) with SMTP id HAA15692 for
<jliu@eur.ericsson.com>; Thu, 3 Apr 1997 07:40:15 -0600 (CST)
Received: from chip ([13.231.212.1]) by alpha.xerox.com with SMTP id <15062(4)
>; Thu, 3 Apr 1997 05:39:43 PST
Received: from dale.mc.xerox.com by chip (5.x/SMI-4.1) id AA20514; Thu,
3 Apr 1997 08:39:41 -0500
Received: by dale.mc.xerox.com (SMI-8.6/SMI-SVR4) id IAA10886; Thu,
3 Apr 1997 08:39:41 -0500
Date: Thu, 3 Apr 1997 05:39:41 PST
From: podon@roch875.mc.xerox.com (Paul J O'Donnell)
Apparently-to: jliu@eur.ericsson.se
To: <jliu@eur.ericsson.se>
Message-id: <199704031339.IAA10886@dale.mc.xerox.com>
MIME-version: 1.0
Content-type: text/PLAIN; CHARSET=US-ASCII
Content-length: 861
>From podon@roch875.mc.xerox.com Thu Apr 3 05:36:47 1997

Jeffrey,

I use this script, but it could use to be cleaned up. Try it.

Paul O'Donnell

#!/bin/sh

# Install the patches that came with the Solaris CDROM
#

cd /cdrom/Patches
./install_patches -p . /a

#Set up .rhosts
#
echo "NISserver root" >> /a/.rhosts
echo "NFSserver root" >> /a/.rhosts
echo "Printserver root" >> /a/.rhosts

# Install the Recommended patches
#
cd /
mkdir /tmp/b
mount NFSserver:/u03/projects/sys_admin/unix/2.5.1patches/2.5.1_Recommended /tmp/b
cd /tmp/b
mkdir /var/sadm/install_data

# Certain patches will not be made without these links.
ln -s /a/var /a/var/var
ln -s /a/usr /a/var/usr
ln -s /a/etc /a/var/etc
ln -s /a/kernel /a/var/kernel

./install_cluster -q

# Save the log file, and clean up
#
cp /var/sadm/install_data/Solaris_2.4_Recommended_log /a/var/sadm/install_data
cd /
umount /tmp/b
echo "finish script is done"

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ)
Content-type: MESSAGE/RFC822
Content-description: jumpstart4
Content-MD5: LtUJ/2Zdbp+kbQaop1uGVg==
X-Sun-Data-type: mail-message

Received: from eur.ericsson.se (dublin) by rides (4.1/SMI-4.1) id AA13984; Thu,
3 Apr 97 06:01:41 PST
Received: from mr2.exu.ericsson.se by eur.ericsson.se (8.6.12/EUR-Dublin)
id GAA11390; Thu, 3 Apr 1997 06:06:58 -0800
Received: from gwa.ericsson.com (gwa.exu.ericsson.se [138.85.147.13])
by mr2.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with ESMTP id IAA20630 for
<jliu@eur.ericsson.se>; Thu, 3 Apr 1997 08:05:10 -0600 (CST)
Received: from bbnplanet.com (mail.bbnplanet.com [198.114.157.21])
by gwa.ericsson.com (8.8.2/8.8.2) with SMTP id IAA17219 for
<jliu@eur.ericsson.com>; Thu, 3 Apr 1997 08:05:09 -0600 (CST)
Received: from cecil.bbnplanet.com by mail.bbnplanet.com id aa15176; 3 Apr 97
9:04 EST
Received: by cecil.bbnplanet.com (8.8.5/SMI-SVR4) id JAA02176; Thu,
3 Apr 1997 09:03:02 -0500 (EST)
Date: Thu, 3 Apr 1997 09:03:02 -0500 (EST)
From: gbean@bbnplanet.com
Subject: Re: Solaris 2.5.1 JumpStart
In-reply-to: <199704022225.OAA06794@dragon.raynet.com> from "Jeffrey Liu" at
Apr 2, 97 02:25:36 pm
To: jliu@eur.ericsson.se
Message-id: <199704031403.JAA02176@cecil.bbnplanet.com>
MIME-version: 1.0
X-Mailer: ELM [version 2.4 PL25]
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
Content-length: 9947
>From gbean@bbnplanet.com Thu Apr 3 06:01:42 1997

>
> Hi,
>
> I'm setup a Solaris 2.5.1 JumpStart Server.
> I've successfull netinstalled OS, but
> I had problem to create a finish script to install
> following software packages:
> 1. CDE
> 2. SSPC
> 3. 2.5.1_Recommended patches
>
> If you have a working script, can you please forward to me?
>
> Thanks,
>
> Jeffrey
>

I'd recommend you pick up a copy of 'Automating Solaris Installations: A Custom
JumpStart Guide' (see http://www.prenhall.com). It's a nice concise how-to
and comes with a diskette of scripts.

Here's a couple scripts I created/modified to do the job:

Add CDE packges:

( note: $CLUSTER refers to a file listing the package names, one name
per line - optional, if you wanted to install a subset of what's in
$PKGDIR. $PKGDIR is a copy of the CDE packages from the CDROM, in this
case located in the JumpStart dir ($SI_CONFIG_DIR) under sw/sunpkgs/cde.

#!/bin/sh

B=/a # base directory of all absolute paths (/a during installation)

PKGDIR=$SI_CONFIG_DIR/sw/sunpkgs/cde

if [ ! -d $PKGDIR ]; then
echo "Can't find package directory: $PKGDIR"
exit 1
fi

#### Debug: Uncomment the following lines
#SI_CONFIG_DIR=
#DEBUG=on
#B=/
#### End Debug

if [ ! -d $B/usr/local ]; then
mkdir $B/usr/local
fi

if [ $# != 0 ]; then
# we have an argument - cluster file
CLUSTER=$1
if [ ! -f $PKGDIR/$CLUSTER ]; then
echo "no such file: $PKGDIR/$CLUSTER"
exit 2
fi
fi

add_pkg()
{

pkginfo -d $B/var/sadm/pkg | /bin/grep -s "$1 " > /dev/null 2>&1
if [ $? != 0 ]; then

echo "Installing the $1 package."

pkgadd -a $SI_CONFIG_DIR/noask_pkgadd -d ${PKGDIR} -R $B $1 \
>> $B/var/sadm/BBNpkgadd.log 2>&1
else
echo "$1 package already INSTALLED."
pkginfo -d $B/var/sadm/pkg | /bin/grep -s $1
fi
}

##
## Main()
##
if [ ${CLUSTER}null = "null" ]; then
for f in $PKGDIR/SUN*
do
add_pkg `basename $f`
done
else
for f in `cat $PKGDIR/$CLUSTER`
do
add_pkg $f
done
fi

exit

For patches, I put all the patches in an exported directory - in this case
a subdir of the JumpSart directory sw/patches/5.5.1 & CDE-1.0.2.
Then I copy the following script to the client's rc3.d dir as S90patcher.
The script executes after jumpstart reboots the system:

#!/bin/sh
# S90patcher
SERVER=sword.bbnplanet.com
PATCHDIR=/export/sw/jumpstart/sw/patches
if [ -f /patch-flag ]
then
echo "
Installing patches...
`date`
(This could take several HOURS!)
"

mount $SERVER:$PATCHDIR /mnt
cd /mnt/5.5.1
./install_patches -u | \
tee /var/sadm/install_data/5.5.1-patch.log 2>&1

cd /mnt/CDE-1.0.2
./install_patches -u | \
tee /var/sadm/install_data/CDE_1.0.2-patch.log 2>&1


echo "
Finished installing patches.
`date`
"

cd /
umount /mnt
rm $0 /patch-flag
touch /reconfigure
fi

exit

install_patches (modified version of sun supllied script):

#! /bin/sh
#
# @(#)install_ms 1.7 94/03/17
# Copyright (c) 1994 by Sun Microsystems, Inc.
#
# Script to install a set of patches in one step
#
set -e

#
# Force the path to first look in certain directories
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
export PATH

#
# Update tag information
# (Tag needs to be convertible to a valid filename too...)
# (size is in kb + overhead)
MS_NAME="Initial_Patches"
MS_DETAIL="Initial Patches Installed"
MS_SIZE=10000
SPECIAL_PATCHES="103612-07 103663-03"

RELEASE=
if [ -f .RELEASE ]; then
RELEASE=`cat .RELEASE`
fi

# Broadcast what we are doing
#
echo
echo "Installing ${MS_NAME} ${RELEASE}"
echo "${MS_DETAIL}"
echo

#
# Command line and environment option processing
#
# (Default is to save base objects)
#
USAGE="usage: `basename $0` [-nosave] [-u]\n\
[-nosave] - don't save the original objects in /var/sadm/patch\n\
[-u] - unconditional install, do not verify file attributes\n"
#USAGE="usage: `basename $0` [-nosave] [-u] [patchdir]\n\
# [-nosave] - don't save the original objects in /var/sadm/patch\n\
# [-u] - unconditional install, do not verify file attributes\n\
# [patchdir] - optional pathname to directory of patches\n"

saveold=''
unc=

#
# Command invocation will be recorded in $LOGFILE,
# to help users determine post-install whether backout
# is possible or not (backout_ms requires install_ms w/o -nosave).
#
command="$0 $*"

for i in $*
do
case $i in
-nosave)saveold='-d'; shift;;
-u) unc='-u'; shift;;
-*) echo "$USAGE"; exit 2;;
*) break;;
esac
done

uid=`id | sed 's/uid=\([0-9]*\)(.*/\1/'`
if [ "$uid" != "0" ] ; then
echo "You must be root to execute this script."
exit 1
fi

logname=`echo ${MS_NAME} | sed 's/ /_/g'`_log
LOGFILE=/var/sadm/install_data/${logname}

#
# Where do we find the list of patches to install
# (we need an absolute pathname...)
#
#if [ $# -gt 0 ]
#then
# PATCHDIR=`cd $1; pwd`
#else
# PATCHDIR=`pwd`
#fi
PATCHDIR=`pwd`

#
# If we are backing up the patches, do we have enough space in the
# backup directory
#
if [ ! -d /var/sadm/patch ] ; then
echo "Create patch archive area"
mkdir /var/sadm/patch
chown bin /var/sadm/patch
chgrp bin /var/sadm/patch
chmod 555 /var/sadm/patch
fi

if [ "${saveold}" != -d ]
then
bytes_avail=`df -b /var/sadm/patch | tail -1`
bytes_avail=`echo $bytes_avail | sed 's/.*\ //'`
if [ ${MS_SIZE} -gt ${bytes_avail} ]
then
echo "Insufficient space in /var/sadm/patch to save old files."
echo "Space required in bytes: ${MS_SIZE}"
echo "Space available in bytes: ${bytes_avail}"
exit 1
fi
fi

#
# Install all the patches in PATCHDIR
#
# Simply go down the list of existing patches and apply them one at a time
#
echo "Installing patches located in ${PATCHDIR}"
echo "Installation will be logged in ${LOGFILE}"
if [ "${saveold}" != -d ]
then
echo "Original objects on the system will be saved in /var/sadm/patch."
fi
echo "***" >> ${LOGFILE}
echo "*** Install ${MS_NAME} ${RELEASE} begins `date` " >> ${LOGFILE}
echo "*** PATCHDIR: ${PATCHDIR} " >> ${LOGFILE}
echo "*** COMMAND: `uname -n`# $command " >> ${LOGFILE}
echo "***" >> ${LOGFILE}

# This is done to maintain the cwd to PATCHDIR to suppress auto unmounts...
cd ${PATCHDIR}
set +e

#
# Assume: all objects that begin with 1 in the current directory are the
# configuration we want to install...
# Assume: shell coallating sequence is the desired install order...
#
tmplog=/tmp/tmplog
prev_installed_list=
not_applicable_list=
obsolete_list=
failed_list=

PATCHES=$SPECIAL_PATCHES
for patch in 1*; do
have=0
for pnum in $SPECIAL_PATCHES; do
if [ $pnum = $patch ]; then
have=1
fi
done
if [ $have = 0 ]; then
PATCHES="$PATCHES $patch"
fi
done

for patch in $PATCHES
do
echo "" >> ${LOGFILE}
echo "Installing ${patch}..." | tee -a ${LOGFILE}

( cd ${patch}; \
./installpatch ${saveold} ${unc} `pwd` ) > $tmplog 2>&1

result=$?

#
# Parse error message strings to handle both older and newer
# versions of installpatch error handling.
#
case ${result} in
0) ;;
1) echo " Installation aborted.\c"
if egrep -s "Patch has already been applied" $tmplog
then
echo " ${patch} was previously applied to the system."
prev_installed_list="${prev_installed_list} ${patch}"
elif egrep -s "This patch is obsoleted by a patch" $tmplog
then
echo " ${patch} has been obsoleted by another patch."
obsolete_list="${obsolete_list} ${patch}"
elif egrep -s "The packages to be patched are not installed" \
$tmplog
then
echo " ${patch} is not applicable to the system."
not_applicable_list="${not_applicable_list} ${patch}"
else
echo " Patch ${patch} failed with return code 1."
failed_list="${failed_list} ${patch}"
fi;;
2) echo " Installation aborted.\c"
if egrep -s "has already been applied" $tmplog
then
echo " ${patch} was previously applied to the system."
prev_installed_list="${prev_installed_list} ${patch}"
else
echo " Patch ${patch} failed with return code 2."
failed_list="${failed_list} ${patch}"
fi;;
6) echo " Installation aborted.\c"
echo " ${patch} has been obsoleted by another patch."
obsolete_list="${obsolete_list} ${patch}";;
8) echo " Installation aborted.\c"
echo " ${patch} is not applicable to the system."
not_applicable_list="${not_applicable_list} ${patch}";;
*) echo " Patch ${patch} failed with return code 1."
failed_list="${failed_list} ${patch}";;
esac
cat $tmplog >> ${LOGFILE} 2>&1
done

#
# A little cleanup. list the patches that failed installation (if any)
#
if [ " ${prev_installed_list}" != " " ]
then
echo
echo "The following patches were previously installed on the system"
echo ${prev_installed_list} | tr ' ' '\012' | sed 's/^/ /g'
fi
if [ " ${not_applicable_list}" != " " ]
then
echo
echo "The following patches are not applicable to the system"
echo ${not_applicable_list} | tr ' ' '\012' | sed 's/^/ /g'
fi
if [ " ${obsolete_list}" != " " ]
then
echo
echo "The following patches have been obsoleted by another patch"
echo ${obsolete_list} | tr ' ' '\012' | sed 's/^/ /g'
fi
if [ " ${failed_list}" != " " ]
then
echo
echo "The following patches failed to install"
echo ${failed_list} | tr ' ' '\012' | sed 's/^/ /g'
fi

echo
echo "Please refer to the installation logfile:"
echo " ${LOGFILE}"
echo "for further details."

#
# Set /var/sadm/patch permissions to allow certain applications
# (e.g. SunPC) to search it.
#
chmod 0755 /var/sadm/patch

exit 0

Finally, the noask_pkgadd file referenced in one of the above scripts...

# adminfile3
# default basedir
mail=
#instance=overwrite
instance=quit
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=ask
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default

Good luck!

-- 

Greg Bean BBN Corporation (617)873-6318 150 CambridgePark Drive gbean@bbnplanet.com Cambridge, MA 02140

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ) Content-type: MESSAGE/RFC822 Content-description: jumpstart5 Content-MD5: LQp8H4H//tfnws39F9aglQ== X-Sun-Data-type: mail-message

Received: from eur.ericsson.se (dublin) by rides (4.1/SMI-4.1) id AA14022; Thu, 3 Apr 97 07:05:33 PST Received: from mr2.exu.ericsson.se by eur.ericsson.se (8.6.12/EUR-Dublin) id HAA11596; Thu, 3 Apr 1997 07:10:50 -0800 Received: from gwa.ericsson.com (gwa.exu.ericsson.se [138.85.147.13]) by mr2.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with ESMTP id JAA25677 for <jliu@eur.ericsson.se>; Thu, 3 Apr 1997 09:09:02 -0600 (CST) Received: from deacon.cogsci.ed.ac.uk (deacon144.cogsci.ed.ac.uk [129.215.144.7]) by gwa.ericsson.com (8.8.2/8.8.2) with SMTP id JAA22077 for <jliu@eur.ericsson.com>; Thu, 3 Apr 1997 09:08:53 -0600 (CST) Received: from burns.cogsci.ed.ac.uk (burns144.cogsci.ed.ac.uk [129.215.144.4]) by deacon.cogsci.ed.ac.uk (8.6.10/8.6.12) with ESMTP id QAA18012 for <jliu@eur.ericsson.com>; Thu, 3 Apr 1997 16:08:35 +0100 Date: 03 Apr 1997 16:08:30 +0100 From: Kevin Davidson <tkld@cogsci.ed.ac.uk> Subject: Re: Solaris 2.5.1 JumpStart In-reply-to: Jeffrey Liu's message of Wed, 2 Apr 1997 14:25:36 -0800 Sender: tkld@burns.cogsci.ed.ac.uk To: Jeffrey Liu <jliu@eur.ericsson.se> Message-id: <ewosp18400h.fsf@cogsci.ed.ac.uk> Organization: HCRC/CogSci MIME-version: 1.0 X-Mailer: Gnus v5.3/Emacs 19.34 Content-type: TEXT/PLAIN; CHARSET=US-ASCII Content-length: 8418 >From tkld@cogsci.ed.ac.uk Thu Apr 3 07:05:34 1997 X-Attribution: tkld X-Face: IK=!I,S[:^|Bug1}@a9VnvjDO"GNt$]}]ea~={AD:+[wb*"i\iVO)=3bq1T~h}M+o[Gg%:F W_nxe>e{k"KwVasaBy"+rL^'?UugT`|I[jr.E3(b`s$Ge|@Xv*LX=Gc<)h`36*j&noJ"~iB"8i/:K' F#5'!i[SGv.Czm4?R')?B7'qiJVyCQv0LMA<Gx{`z4es%j8S/Vc X-Subliminal-Message: Some settling of contents may occur during transit. Lines: 313 References: <199704022225.OAA06794@dragon.raynet.com>

>>>>> In article <199704022225.OAA06794@dragon.raynet.com>, Jeffrey Liu <jliu@eur.ericsson.com> writes: jliu> I had problem to create a finish script to install jliu> following software packages: jliu> 1. CDE jliu> 2. SSPC jliu> 3. 2.5.1_Recommended patches

jliu> If you have a working script, can you please forward to me?

Here's my finish script. It installs CDE, power management (where applicable) and all the latest patches. The patches are put into directories named patches/01 patches/02 patches/03 etc. patches/01 contains patches that must be installed before others (eg 103612-07, 103663-05), 02 contains basic system patches. 03 is OpenWindows patches, 04 is CDE patches.

The CDE install is not obvious - you need to install each of the packages, but to do it non-interactively you need to provide a pkgadd admin file.

I also have scripts for applying new patches to machines that have already been installed - it uses showrev to find out which ones are missing and installs them from the patches/?? directories

The files directory contains a hierarchy of files that should replace the default files. It includes modified inetd.conf, hosts.equiv and so on files as well as a couple of scripts that go in /etc/rc2.d to finish off the installation - one to enable printing, and one to tidy up the CDE installation. These scripts are after the finish script.

------------------------------8<--snip-snip--8<------------------------------ #!/bin/sh # Customisation for CogSci/HCRC JumpStart installations # Don't forget new / is mounted on /a # Usage: cogsci_finish [path to root] # eg on server: cogsci_finish /export/root/client-name # Run by jumpstart with no args, so defaults to /a

if [ $# -gt 0 ]; then rootdir=$1; shift; else rootdir=/a fi

echo Using $rootdir as installation root directory.

if [ "$SI_CONFIG_DIR" = "" ]; then SI_CONFIG_DIR=`dirname $0` SI_SYS_STATE=$rootdir/etc/.sysIDtool.state SI_KARCH=`uname -m` if [ $rootdir = "/" ]; then SI_HOSTNAME=`uname -n` else SI_HOSTNAME=`basename $rootdir` fi fi

fdir=${SI_CONFIG_DIR}/files pdir=${SI_CONFIG_DIR}/patches passdir=${SI_CONFIG_DIR}/passwd cdedir=${SI_CONFIG_DIR}/CDE pmdir=${SI_CONFIG_DIR}/upd_sol_2_5_1_smcc/SMCC printdir=${SI_CONFIG_DIR}/printer

# link source dest # Renames original dest to foo.DIST first link() { if [ -f $2 ] ; then mv $2 $2.DIST fi ln -s $1 $2 }

# copy source destdir mode # source relative to files/ dir # dest relative to new root copy() { if [ -f $rootdir/$2/$1 ] ; then mv $rootdir/$2/$1 $rootdir/$2/$1.DIST fi cp $fdir/$1 $rootdir/$2 chmod $3 $rootdir/$2/$1 }

copyfiles() { ( umask 022 cd $1 for f in `find . -type f -print` ; do if [ -f $rootdir/$f ] ; then if [ ! -f $rootdir/$f.DIST ] ; then echo Saving $rootdir/$f mv $rootdir/$f $rootdir/$f.DIST fi fi echo Installing $rootdir/$f cp $f $rootdir/$f done ) }

makelinks() { cat $1 | while read source dest ; do link $source $rootdir/$dest done }

install_pkgs() { cd $1 shift for pkg in $@ ; do pkgadd -n -r /dev/null -a /tmp/admin.$$ -d . -R $rootdir $pkg done }

# Install extra packages # Set up pkgadd input file for noninteractive install cat > /tmp/admin.$$ <<EOF basedir=default mail= runlevel=quit conflict=nocheck setuid=nocheck action=nocheck partial=nocheck instance=unique idepend=nocheck rdepend=nocheck space=quit EOF

# First CDE echo Installing CDE install_pkgs $cdedir/sparc/cde-min SUNWdtft SUNWdtdmn SUNWdtbas SUNWdticn SUNWdtdte install_pkgs $cdedir/sparc/cde-end-user SUNWdtwm SUNWdthe SUNWdthev SUNWdtdst SUNWdtim SUNWdtrme install_pkgs $cdedir/sparc/cde-developer SUNWdtinc SUNWdtma SUNWdtmad SUNWdthed SUNWdtab SUNWdtdem SUNWmfdev

# Then power management #echo Installing power management software pmpkgs="SUNWpmch SUNWpmman SUNWpmow SUNWpmr SUNWpmu"

if [ -z "${SI_KARCH}" ] ; then SI_KARCH=`uname -m` fi

case ${SI_KARCH} in sun4m) install_pkgs $pmdir SUNWcpr.m SUNWpmc.m ${pmpkgs} ;; sun4u) install_pkgs $pmdir SUNWcpr.u ${pmpkgs} ;; *) echo No power management for ${SI_KARCH} esac

# Make space in / # glurk! But we re-mount it all from stevenson anyhow... # Need to preserve some for patches to succeed. Tidy up later #echo "DEBUG: moving /opt out of harms way for inspection" #mv $rootdir/opt $rootdir/optX

echo "Making space in $rootdir by deleting $rootdir/opt/*" echo " - will be mounted from stevenson" for dir in $rootdir/opt/* ; do /usr/bin/rm -rf $dir done

# Now install patches if [ -d $pdir ]; then echo "Applying latest recommended patches" for l in $pdir/* ; do for d in $l/* ; do $d/installpatch -R $rootdir $d done done fi

#Clear up rest of /opt now patches are installed #for d in SUNWdxlib SUNWits SUNWtcx ; do # /bin/rm -rf $rootdir/opt/$d #done

# Local mountpoints - most are automounts, so are created automagically echo "Making directories" mkdir -p $rootdir/etc/dt/config mkdir -p $rootdir/etc/dt/appconfig/icons/C mkdir -p $rootdir/etc/tt mkdir -p $rootdir/var/tooltalk/root mkdir -p $rootdir/var/tooltalk/usr chmod -R 755 $rootdir/etc/dt $rootdir/etc/tt $rootdir/var/tooltalk

# Then delete troubleseome files echo 'Deleting files' for f in $rootdir/etc/rc?.d/*sendmail ; do echo $f rm $f done

# Then copy files echo "Installing files" copyfiles $fdir

# Next the symlinks echo "Making links" makelinks ${SI_CONFIG_DIR}/link.cfg

# Then append files # Modify /etc/system for NTP cat >> $rootdir/etc/system <<END * Zero dosynctodr for NTP set dosynctodr=0 * Don't trust non-root NFS clients set nfs:nfs_portmon = 1 END

# Add local magic numbers (eg WordPerfect, Gzip) cat ${SI_CONFIG_DIR}/magic >> $rootdir/etc/magic

# Then edit files

# Then other activities echo "Making manual indices" catman -w -M $rootdir/usr/man catman -w -M $rootdir/usr/dt/man catman -w -M $rootdir/usr/openwin/man echo "Correcting printer log permissions" chown lp $rootdir/var/lp/logs/lpNet chgrp lp $rootdir/var/lp/logs/lpsched

# Set default printer if [ -f $printdir/${SI_HOSTNAME} ] ; then echo "Setting default printer" cp $printdir/${SI_HOSTNAME} $rootdir/etc/defaultprinter fi

if [ "`grep '0 # root' ${SI_SYS_STATE}`" != "" ] ; then echo "Setting default root password" # set the root password if [ -f $passdir/${SI_HOSTNAME} ] ; then PASSWD=`cat $passdir/${SI_HOSTNAME}` else PASSWD=`cat $passdir/default` fi mv $rootdir/etc/shadow $rootdir/etc/oshadow nawk -F: '{ if ( $1 == "root" ) printf"%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1,passwd,$3,$4,$5,$6,$7,$8,$9 else printf"%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9 }' passwd="$PASSWD" $rootdir/etc/oshadow > $rootdir/etc/shadow chmod 400 $rootdir/etc/shadow chgrp sys $rootdir/etc/shadow # set the flag so sysidroot won't prompt for the root password sed -e 's/0 # root/1 # root/' ${SI_SYS_STATE} > /tmp/state.$$ mv /tmp/state.$$ ${SI_SYS_STATE} fi ------------------------------8<--snip-snip--8<------------------------------ #!/bin/sh # 25/7/95 tkld # Customise for CogSci printers # Solaris 2

SCRIPT=/etc/rc2.d/S98setup.print pserver=knox

echo 'Initialising printer services'

lpsystem -t bsd $pserver

for printer in lw1 lw2 lw3 lw4 lw5 lw8 dj1; do lpadmin -p $printer -s $pserver -I any accept $printer enable $printer done

# Magic file created by custom jumpstart installation if [ -f /etc/defaultprinter ] ; then lpadmin -d `cat /etc/defaultprinter` /bin/rm -f /etc/defaultprinter fi

chown lp /var/lp/logs/* chgrp lp /var/lp/logs/*

echo "Done. Removing install script. $SCRIPT" # Then remove self /bin/rm -f $SCRIPT ------------------------------8<--snip-snip--8<------------------------------ #!/bin/sh # Fix up things not finished by auto install of CDE

SCRIPT=/etc/rc2.d/S99cdefixup

# First compile dtterm terminfo entry /usr/bin/tic /usr/dt/config/dtterm.ti

# Now enable CDE dtlogin /usr/dt/bin/dtconfig -e /etc/init.d/dtlogin start

# Remove script echo Removing $SCRIPT /bin/rm -f $SCRIPT ------------------------------8<--snip-snip--8<------------------------------

-- 
|Kevin.Davidson@edinburgh.ac.uk +-+ Centre for Cognitive Science/HCRC,        |
|tkld@cogsci.ed.ac.uk           | | University of Edinburgh,                  |
|+44 (0)131 650 6879     .oOo.  | | 2 Buccleuch Place, EH8 9LW.        .oOo.  |
`-------------------------------' `-------------------------------------------'

--Boundary_(ID_7ahrs/9023QUpDnBw75SzQ)--