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 SUSE
grub-install.unsupported
GRUB-INSTALL(8) FSF GRUB-INSTALL(8)NAME
grub-install - install GRUB on your drive
SYNOPSIS
grub-install [OPTION] install_device
DESCRIPTION
Install GRUB on your drive.
-h, --help
print this message and exit
-v, --version
print the version information and exit
--root-directory=DIR
install GRUB images under the directory DIR instead of the root directory
--grub-shell=FILE
use FILE as the grub shell
--no-floppy
do not probe any floppy drive
--force-lba
force GRUB to use LBA mode even for a buggy BIOS
--recheck
probe a device map even if it already exists
INSTALL_DEVICE can be a GRUB device name or a system device filename.
grub-install copies GRUB images into the DIR/boot directory specfied by --root-directory, and uses the grub shell to install grub into the
boot sector.
The grub source distribution carries this script to ease the installation of grub as a boot loader. In Suse Linux however, grub installa-
tion is much better handled by Yast; use of this script is generally discouraged and therefore unsupported. Consequently, the script has
been renamed to grub-install.unsupported.
In order to (re-)install grub for the currently running system, simply use Yast. For an installation aiming at a differing system, the
crafting of an appropriate device.map and grub shell script is strongly advised, e.g. "grub --batch --device-map=target-device.map < tar-
get-grub.conf"
SEE ALSO
The full documentation for grub-install is maintained as a Texinfo manual. If the info and grub-install programs are properly installed at
your site, the command
info grub-install
should give you access to the complete manual.
grub-install (GNU GRUB 0.97) May 2005 GRUB-INSTALL(8)