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)
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... (1 Reply)
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 all
So I am thinking my inability to cope with math is bogging me down here so Im asking for help.
I want to determine how long a user has been logged on for by using the date and who commands to determine the time they have been logge don.
My problem is that I keep getting the wrong... (2 Replies)
Is there a way for a server to determine client's DNS ip? I have an application that logs client's IP but in certain cases its desirable to know their DNS too (1 Reply)
Hi all,
Using sh/csh, unfortunately shell scripts are not my strong suit.
Trying to write a script that gets called from a program for pre-processing.
The program passes individual components of a UNC (//server/path1/path2/filename).
Thus the unc path of: //server/path1/path2/filename, is... (7 Replies)
Hello All :)
I want to write a shell script to find the file system usage on multiple UNIX servers.
Commands: df -g fsJCAPS
Below script works fine and it displays results on terminal/console. I want to store /redirect output on to local server from where I'm running the script.
... (3 Replies)
how do we determine if ip addresses are hosting IIS version 7.x or Apache 2.2.x. ? (3 Replies)
Discussion started by: NameSake
3 Replies
LEARN ABOUT CENTOS
ksvalidator
KSVALIDATOR(1) General Commands Manual KSVALIDATOR(1)NAME
ksvalidator -- verify the syntax of a kickstart file
SYNOPSIS
ksvalidator [-e | --firsterror] [-i | --followincludes] [-l | --listversions] [-v | --version VERSION] INFILE
DESCRIPTION
ksvalidator is a program that takes an input kickstart file and attempts to verify that it is syntactically correct. This includes check-
ing basics like proper quoting and making sure required options have values, and more advanced checks like verifying the file does not
include deprecated or removed kickstart commands. Mutually exclusive options can also be caught, as can certain classes of partitioning
errors (like using the same device name multiple times).
ksvalidator does have its limitations. It cannot run validate the syntax of %pre and %post scripts, nor does it attempt to run them. It
cannot check that the %packages section is valid. Most importantly, it cannot guarantee that an input kickstart file will install prop-
erly, because it does not understand the complexities of partitioning and what potentially already exists on disk.
EXIT STATUS
ksvalidator returns 0 on success, and 1 if INFILE does not exist or there is an error parsing the kickstart file.
OPTIONS -e, --firsterror
Stop on the first warning or error. By default, ksvalidator will attempt to process the entire file, potentially raising multi-
ple errors.
-i, --followincludes
Process included files in the input file when they are seen, like anaconda would. If the included file does not exist (this can
happen for a variety of reasons, but the most common being a %pre script that generates an included file) and this option is
given, an error will be generated and processing halted.
-l, --listversions
List all versions of kickstart syntax supported by ksvalidator. This is useful for determining what values can be fed back in on
a second run.
-v, --version VERSION
Use this version of kickstart syntax when processing the file, or the latest if no version is given.
SEE ALSO
ksflatten (1), ksverdiff (1)
KSVALIDATOR(1)