The bootcheck script is an administrative script the systems administrator
can configure to run checks just before the Rushd daemon/service starts.
This allows a single script to intercept the daemon startup across
platforms consistently, instead of having to hack boot scripts.
Common things to test are if mounts are in place, drive maps
have been mapped, if DHCP has resolved the machine's IP address,
DNS/hostname lookups are working, temp directories cleared, etc.
This script is enabled by uncommenting these lines (shown in red)
in the rush.conf file:
Bootcheck Configuration in rush.conf
|
# BOOT CHECK COMMAND
# Command run during boot to check if machine is ready.
# Uncomment + modify example scripts as needed.
#
os=windows bootcheck_cmd "perl c:/rush/etc/bootcheck"
os=unix bootcheck_cmd "perl /usr/local/rush/etc/bootcheck"
|
NOTE #1: You can rewrite this script in python, or any other language you prefer,
as long as the language is installed on your machines. Just change 'perl'
in the above commands to 'python', 'sh', or whatever you prefer,
and rewrite the script in that scripting language.
NOTE #2: In Rush 103.07b, the bootcheck_cmd is enabled by default to run the
'rush -bootcheck' command. This
is to solve issues with some OS's starting rush before networking
is ready. You can still change this to run your own script instead,
or the default bootcheck script.
If you are only concerned with running bootcheck on a single machine,
you can enable this script to be executed only on that particular
machine using a host= prefix to target a single machine
(or +hostgroup of machines), e.g.
host=tahoe bootcheck_cmd "perl /usr/local/rush/etc/bootcheck"
When enabled, this script will be run right when the Rushd service starts,
but before it initializes itself to load any config files and start renders.
The script should simply loop if the machine is not ready; when the script
returns, Rushd will finish initializing.
Currently exit codes are ignored, but the exit code of your script
should be zero. Basically your script should not return until the
machine is fit for rendering.
Note that the script will not be able to run 'rush' commands,
as the service's network ports are not yet listening for connections.
So you can only interact with the operating system from this script.
You should modify the logic of this script to do whatever checks
you want. To check that networking is up, you can check commands like
'ifconfig',
'ipconfig /all',
'netstat -r', etc.
To check hostname resolution, you can use commands like
'ping',
'nslookup', etc.
For reasons that should be obvious, this script must exist LOCALLY on each
machine in order to be available when file servers might be down or unavailable.
Since the script lives in rush/etc, it can be pushed around the network with
'rush -push bootcheck +any'.
Caveats
See Also
|