Now me describe the thought of BootScripting. BootScripting is the process of creating one small script in any scripting language. I am a big fan of Perl so I will do my example in that. The basic idea is the script is just big enough to connect to a database and take in parameters. Once it connects to the database it generates the rest of itself.
#!/usr/bin/perl
use strict;
use DBI;
my $dbh = DBI->connect("DBI:mysql:database=scripts;host=scriptmaster.local","scriptmaster","scriptmasterpassword") || die "Can't connect to the DB";
my $script_id_temp = $ARGV[0];
my $script_id = 0;
$script_id = $1 if((defined($script_id_temp)) && ($script_id_temp =~ m/(\d)/));
$sth = $dbh->prepare("select script_body from scripts where script_id=?") or die "Can't prepare Statement";
$sth->execute($script_id);
my ($script_data) = $sth->fetchrow_array;
eval $script_data;
$dbh->disconnect;
exit;
This script if worked on can probably be more streamlined and cleaned up. What this approach helps you do is to put focus on writing the scripts and focus on the functionality and not have to worry about if all the servers you have the script on are up-to-date.
ROAR