##
# Don't assume ROVER_HOME is defined.
# When running on the target after hibernation the system
# starts the executive automatically and ensures that it
# restarts when it crashes. The issue is that ROVER_HOME
# isn't defined at that point.
#
# To stop the automatic nature of executive, comment-out
# the "rovr" line in /etc/inittab then reboot the system.
#
rover_home = ENV["ROVER_HOME"]
unless (rover_home)

  ##
  # This is the only place in the system where
  # the home directory is specified.
  #
  ROVER_HOME = "/cf/barbo"
  ENV["ROVER_HOME"] = ROVER_HOME
  Dir.chdir(ROVER_HOME)
  Dir.chdir("control")

  ##
  # Add the Rover bin directory to the path
  #
  path = ENV["PATH"]
  path += ":/cf/lib"
  ENV["PATH"] = path
else
  puts("_ Supervisor running under pre-existing environment...")
end

