Installer script needs to determine own location...
My n00b question:
I am trying to write a script that I can place on a flash drive and then move from computer to computer and install a file, which is bundled with the script. (ie the script is at /Volumes/FlashDrive/Folder/Script, the file is at /Volumes/FlashDrive/Folder/File)
So far I have figured the
"${0}" will determine the ever-changing location of the script, but how can I use that (or something else, for that matter) to also determine the location of the file to be installed?
So far, I have something like this:
With the obvious problem that "$MYPATH" includes the name of the running script after the directory in which it and the file are located.
Hello expert,
What I want is to determine whether the script is called from CRON or it is executed interactively?
I tried the following but no luck:
#!/bin/ksh
cronID=`pgrep -x cron`
GPID=`ps -ef -o ppid,pid | grep " $PPID$" | awk '{print $1}'`
if ; then
echo I am being run... (15 Replies)
I am writing an installation script on AIX. This involves typical checks of some pre requisites like java, oracle, some version checks, disk space etc. It is a long script. I am facing a strange problem. There are a no of functions used in the script. What I see is that the installer complains of... (1 Reply)
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Hi everyone,
Is there a slick way to determine the FULL name of a script that is running?
The variable ${0} just gives the relative path name.
I guess I could just do the following:
FULL_SCRIPT_NAME=${PWD}${0}Although that's pretty simple is there another way that I am missing?
... (4 Replies)
Hi
This is my third past and very impressed with previous post replies
Hoping the same for below query
How to find a existing file location and directory location in solaris box (1 Reply)
Xfce desktop installer script on Ubuntu for home, office or server computers.
This script installs Xfce desktop and a set of programs according to user needs starting from an Ubuntu Server base system. It's valid for netbooks, notebooks, desktop computers and servers.
For more information... (1 Reply)
Heyas
Just recently i tried to apply the GNU Autotools to my project, while it was possible, it took forever to know where to create which files and what to place in each of them.
Dare you making a space rather than a tab!
Inspired by GNU Autotools, and overhelmed by its functionality and... (0 Replies)
Need help with the script, I am trying to include this script as part of kickstart profile.
based of the host's IP address, in this case if the host is IP starting with 10.10.3.* or 10.10.6.*, I will be pushing appropriate routing file from my web server.
I validate host IP from nslookup.
... (3 Replies)
Hi Guys,
I have one installer shell script which normally get from the dev team to install the app and it works fine for years (in IAX) the same installer/script iam trying to run in Linux 7.2 but it stuck somewhere which I cannot debug, can you help me to point out where it stuck .
here is the... (9 Replies)
Heyas
As someone said he'd like to see some more projects posts on the forum, so, here's one I hope is ready.
Not so much fun-fun, but practical ;)
I hope...
So, you have that small non-arch project you would like to install, but get the feeling that GNU Autoconf is a bit too 'massive' for... (2 Replies)
Discussion started by: sea
2 Replies
LEARN ABOUT LINUX
installer
installer(1M) System Administration Commands installer(1M)NAME
installer - Solaris Web Start installer utility
SYNOPSIS
installer [-locales list] [-nodisplay] [-noconsole] [-debug]
DESCRIPTION
The installer utility invokes a Web Start install wizard sequence which will lead the user through a sequence of installation panels. This
installer utility is found on many CDs that are shipped with Solaris and it will be found among the top level files of these CDs.
When the installer is on a CD being accessed from a desktop file manager, the installer can be double clicked to start the installation
sequence. If the user is not currently the system's root user, the root user password will be requested.
The installer utility can also be run from other UNIX scripts. Usually, a script is used in conjunction with the utility's -nodis-
play option. Add the -noconsole option for non-interactive scripts.
OPTIONS
The following options are supported:
-locales list Selects product translations for install, corresponding to the specified list of locales if the specified locale transla-
tions are present on the installation media. Locales are supplied in a comma-separated list following the -locales option.
An example list would appear as follows:
installer -locales fr,de,it
This would install products with translations for the French, German, and Italian locales.
-nodisplay Runs the install without a graphical user interface. Use the default product install unless it was modified by the -locales
options.
-noconsole Run the install without any interactive text console device. Useful when paired with -nodisplay for non-interactive UNIX
script use.
-debug Outputs extra information about what the install is doing. Mainly for install diagnostic purposes.
FILES
/var/sadm/install/logs location of installation log files
SEE ALSO prodreg(1M)SunOS 5.10 11 December 2001 installer(1M)