Index: trunk/Nebulous-Server/bin/neb-initdb
===================================================================
--- trunk/Nebulous-Server/bin/neb-initdb	(revision 18386)
+++ trunk/Nebulous-Server/bin/neb-initdb	(revision 39668)
@@ -18,9 +18,6 @@
 
 my ($db, $dbhost, $dbuser, $dbpass);
-
-$db     = $ENV{'NEB_DB'} unless $db;
-$dbhost = $ENV{'NEB_DBHOST'} || 'localhost';
-$dbuser = $ENV{'NEB_USER'} unless $dbuser;
-$dbpass = $ENV{'NEB_PASS'} unless $dbpass;
+my ($trap, $actually_do_it);
+# Removed default options using environment variables because it's too dangerous.
 
 GetOptions(
@@ -29,9 +26,16 @@
     'user=s'    => \$dbuser,
     'pass=s'    => \$dbpass,
+    'yes_i_know_what_im_doing'  => \$trap,
+    'yes_i_know_what_im_doing_really=s' => \$actually_do_it,
 ) || pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --db --user --pass", -exitval => 2 )
-    unless $db && $dbuser && $dbpass;
+pod2usage( -msg => "Required options: --db --user --pass --host", -exitval => 2 )
+    unless $db && $dbuser && $dbpass && $dbhost;
+pod2usage( -msg => "Aborting due to mistake in options.  Check code.", -exitval => 2) if ($trap);
+pod2usage( -msg => "Aborting due to mistake in options.  Check code.", -exitval => 2) unless (defined($actually_do_it));
+if ($actually_do_it ne 'this_is_intentionally_difficult') {
+    pod2usage( -msg => "Aborting due to mistake in options.  Check code.", -exitval => 2);
+}
 
 my $dbh = DBI->connect(
@@ -48,14 +52,19 @@
 my $sql = Nebulous::Server::SQL->new();
 
-print "Dropping any existing tables...";
+print "Not dropping any existing tables because that's dangerous...";
+#
+#foreach my $statement (@{ $sql->get_db_clear }) {
+#    $dbh->do( $statement );
+#}
 
-foreach my $statement (@{ $sql->get_db_clear }) {
-    $dbh->do( $statement );
-}
-
-print " OK\nCreating new tables...";
+print " OK!\nCreating new tables...";
 
 foreach my $statement (@{ $sql->get_db_schema }) {
-    $dbh->do( $statement );
+    eval {
+	$dbh->do( $statement );
+    };
+    if ($@) {
+	die "Error received: $@\n";
+    }
 }
 
@@ -72,5 +81,5 @@
 =head1 SYNOPSIS
 
-    neb-initdb [--db <database>] [--user <username>] [--pass <password>]
+    neb-initdb [--db <database>] [--user <username>] [--pass <password>] [--host <dbhost>]
 
 =head1 DESCRIPTION
@@ -78,5 +87,6 @@
 This program initialize a database for use by L<Nebulous::Server> by creating
 the appropriate set of tables.  Any pre-existing tables with conflicting names
-are first removed.
+are first removed.  This help file intentionally does not tell you how to make
+the program actually work.
 
 =head1 OPTIONS
@@ -84,21 +94,21 @@
 =over 4
 
-=item * --db|-d <database>
+=item * --db <database>
 
 Name of database (C<namespace>) to create tables in.
 
-Optional if the appropriate environment variable is set.
 
-=item * --user|-u <username>
+=item * --user <username>
 
 Username to authenticate with.
 
-Optional if the appropriate environment variable is set.
 
-=item * --pass|-p <password>
+=item * --pass <password>
 
 Password to authenticate with.
 
-Optional if the appropriate environment variable is set.
+=item * --host <dbhost>
+
+Host to generate the database tables on.
 
 =back
@@ -106,27 +116,5 @@
 =head1 ENVIRONMENT
 
-These environment variables may be used in place of the specified command line
-options.  All command line option will override the corresponding environment
-value.
-
-=over 4
-
-=item * C<NEB_DB>
-
-Equivalent to --db|-d
-
-=item * C<NEB_USER>
-
-Equivalent to --user|-u
-
-=item * C<NEB_PASS>
-
-Equivalent to --pass|-p 
-
-=back
-
-=head1 CREDITS
-
-Just me, myself, and I.
+No environment variables interact with this program.
 
 =head1 SUPPORT
@@ -134,11 +122,7 @@
 Please contact the author directly via e-mail.
 
-=head1 AUTHOR
-
-Joshua Hoblitt <jhoblitt@cpan.org>
-
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2007  Joshua Hoblitt.  All rights reserved.
+Copyright (C) 2005-2016  IPP.  All rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under
