Help - Search - Members - Calendar
Full Version: Xen 3.0 Install Script for RHES 4
linux-noob.com/forums > Linux Noob > Tips and Tricks
russoaks
I'm having a problem with the xen-install-rhel4.1 script while attempting to install Xen on RedHat 4 - I'm getting stopped at this point:

CODE
eval `/etc/xen/scripts/grubread.pl $active_kernel_version < ${GRUB_CONF}`
    if [ -z "$GRUB_ROOT" -o -z "$FS_ROOT" ]; then
        echo "Unable to update ${GRUB_CONF}." > /dev/stderr
        exit 1
    fi

What are the -z and -o options for and how are they being used here? If I can get a better understanding of what is happening, I can figure out a work around or be able to fix the issue.
znx
QUOTE (russoaks @ Aug 2 2006, 02:44 PM) *
What are the -z and -o options for and how are they being used here? If I can get a better understanding of what is happening, I can figure out a work around or be able to fix the issue.


-z If string is empty return TRUE.
-o Logical OR

So .. if $GRUB_ROOT is empty OR $FS_ROOT is empty ... inform the user and exit. So, what you need is one of those variables to be set and not be empty.

You could do this, if you knew what the variable was being used for:
CODE
export GRUB_ROOT '/the/correct/path'


Or maybe its set somewhere inside the script?

(as a side note)
Notice the " " around the $GRUB_ROOT .. they are very important in scripting. Also this will tell you all of the tests that are available and the meaning.
CODE
man test
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.