Installing Patches from a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Installing Patches from a script
# 1  
Old 12-12-2003
Installing Patches from a script

Hello all,

I'm hoping someone might be able to help me here. After installing Solaris, we use a script to copy site sepcific files over the machine. Now I want the script add the appropiate Sun patches as well. As the script hits that part it errors out, now the script finishes but the Patch part does not. I am not sure if its totally possible, but I am a firm believer that UNIX can be strecthed far and wide. I get the sense that the patch cannot run from within side the script, perhaps in its own shell? The purpose is to make all this non-interactive. So I'd like to be able run the script with no interaction.

Here is the part that spawns the patch part of the script, or is suppose to anyway:


#--------------------------------------------------------
case `uname -r` in
5.5.1)
# Install patches for 2.5.1
echo "Installing Patch cluster for Solaris 2.5.1"
/apps/patches/Solaris_2.5.1/2.5.1_Recommended/install_cluster -q
;;
5.6)
# Install Patches for 2.6
echo "Patches unavailable, Please install manually"
;;
5.7)
# Install Patches for 2.7
echo "Installing Patch Cluster for Solaris 7"
/apps/patches/Solaris_7/7_Recommended/install_cluster -q
;;
5.8)
# Install Patches for 2.8
echo "Installing Patch Cluster for Solaris 8"
./apps/patches/Solaris_8/8_Recommended/install_cluster -q
;;
5.9)
# Install Patches for 2.9
echo "Installing Patch Cluster for Solaris 9"
/apps/patches/Solaris_9/9_Recommended/install_cluster -q
;;
*)
;;

esac
# 2  
Old 12-12-2003
You said the script errors out but then it finishes? So does the script end nicely or not? If not, what's the error you're getting?

Are you sure it's not just the last, default option that's being executed in the case statement and so nothing is being output to the screen?

Also, I noticed that only in one section of that statement did you use ./apps whereas the rest use /apps. This could be a big difference and could result in certain files not being found...
# 3  
Old 12-12-2003
error

Error: for patch part

Patch Cluster install script for Solaris 9 Recommended

Determining if sufficient save space exists....
du: failed for /path/path: Cycle deteced
expr: syntax error

Then the script continues on finishing its other task. It seems to be doing a du in the directory where the script is sitting and not on the host machine.
Smilie
# 4  
Old 12-12-2003
I guess I have path issues, if i cd to the directory where the Patch Cluster resides it runs fine.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

List of Installed patches for AIX from given set of patches

I need to find out list of installed patches from given list of patches. I have tried using instfix -f <File containing list of patches> -i -c But I was not able to understand the output of this command. It was like below. bos.perf.tools: :0.0.0.0:?: bos.rte.libc: :0.0.0.0:?: ... (4 Replies)
Discussion started by: Saurabh Agrawal
4 Replies

2. Shell Programming and Scripting

Comparison of 2 sun server patches using script

Hi, I am not sure what I am missing, tried to debug but was not successful, any help on this will be much appreciated. #!/bin/sh rm -f /tmp/t? host1=`cat $1|grep Hostname: | awk '{print $2}'` host2=`cat $2|grep Hostname: | awk '{print $2}'` rel1=`cat $1|grep Release: | awk '{print... (1 Reply)
Discussion started by: Sathvik
1 Replies

3. Solaris

patches

# /usr/sbin/patchadd -p | grep 119961 Patch: 119961-02 Obsoletes: Requires: Incompatibles: Packages: SUNWsprot Patch: 119961-04 Obsoletes: Requires: Incompatibles: Packages: SUNWsprot I was trying to check if i have the above patch on my system when i got the result as shown above, does this... (1 Reply)
Discussion started by: seyiisq
1 Replies

4. Shell Programming and Scripting

shell script that would display installing.... when installign something

Hi, I am developing a shell script that would install a software when it is run. I want to displaying Installing <so and so>........ when it is actually installing it. I want it to be dynamic, in the sense, I want the dots after installing grow and drop. Is there a way we can do it.... (1 Reply)
Discussion started by: eamani_sun
1 Replies

5. Linux

Installing Firefox and now ended up installing latest glibc

Hi all, I wanted to install the latest version of firefox 2 but it seems when I attempt to install it, it seems to be saying it is looking for c libraries version 2.3? I believe I currently have an older version of the c libraries. I am currently running Sun's JDS Linux 2003. My Mozilla web... (1 Reply)
Discussion started by: scriptingmani
1 Replies

6. UNIX for Dummies Questions & Answers

Installing Patches in HPux

Hi admins.... I want to install 100 Patches in Hpux.. is it possible to install using single command.... if possible ple give me the solution... (1 Reply)
Discussion started by: Prem
1 Replies

7. Solaris

OS Patches

Hi all, We are planning to install Oracle 10g in the Sun Solaris 10 (64 bit Sun Sparc ). Can any one please tell me what are the OS level patches that has to be installed in the OS before starting installation of Oracle 10g. Thanks and Regards, Prashanth (1 Reply)
Discussion started by: prashanth_gs
1 Replies

8. UNIX for Dummies Questions & Answers

pkgadd fails when installing Solaris 8 patches

Hi, guys ! I usually run this task without even thinking on outcome, because it never failed. But this time when I tried installation of patches for Solaris 8 OS on my old machine, I received this message: "pkgadd: ERROR: no packages were found in </var/spool/pkg>" I compared the contents... (5 Replies)
Discussion started by: Deicide5997
5 Replies

9. Solaris

Installing patches

I downloaded solaris's patchmanager program, analyzed my system and it spewed out a list of probably around 75 patches that needed to be installed. First off is it nessacary to install all of these? Should I install all of these in single user mode. Is the "smpatch update" command the best to... (7 Replies)
Discussion started by: meyersp
7 Replies

10. Solaris

Installing patches

I'm attempting to install a Sun patch and keep getting an error: # patchadd /tmp/patches/110722-03 Checking installed patches... One or more patch packages included in 110722-03 are not installed on this system. Patchadd is terminating. # How can I find out what are the "One or... (7 Replies)
Discussion started by: FredSmith
7 Replies
Login or Register to Ask a Question