The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-26-2008
dhs23 dhs23 is offline
Registered User
 

Join Date: Jan 2008
Posts: 7
Help with an install script

Hello all.

I have a script I have written which runs a silent install of Mcafee AV and ePO for Mac OS X.

The issue I am wondering about is what happens when the script launches the installers.

The script is fairly simple, and just invokes the shell installer for each app:

Code:
#! /bin/sh

# script to install Mcafee VirusScan and ePolicy Orchestrator 3.6

# cd to temp install directory

cd /tmp/Mcafee_Install/

# Launch AV installer

installer -pkg VirusScan.pkg -target /

# Sleep while AV installer completes install

sleep 60

# Next installs ePolicy Orchestrator

./cmdinstall 10.44.112.40:82

# Sleep while ePO installer completes.

sleep 120

# Reboot to complete install.

reboot
You'll notice that I have told the script to sleep after launching the installer for each app. My question is: "Is this necessary?"

My thinking was that once the script has launched the installer, that's a separate process and as far as I am aware, my script would simply continue with the second install immediately. I don't want both apps installing at the same time, or the system rebooting halfway through the second install, so I told the script to sleep for a moment, to give the installs a chance to complete.

Am I being silly here? Are the sleep commands necessary? Will the script wait for the install to complete before launching the next install, or rebooting in the case of the second install?

Any thoughts?

Cheers
Reply With Quote
Forum Sponsor