Linux-Noob Forums

Full Version: Xen 3.0 Install Script for RHES 4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.


Quote: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