From bc65c8c4802ac1e3e10402e019c56a854f90d225 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Sat, 29 Jan 2011 16:37:18 -0700 Subject: [PATCH] Added die to config. --- bin/auto | 8 ++++++++ etc/example.conf | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/bin/auto b/bin/auto index 765bdd7..dcf20e5 100755 --- a/bin/auto +++ b/bin/auto @@ -111,6 +111,14 @@ our $CONF = Parser::Config->new("auto.conf") or err(1, "Failed to parse configur our %SETTINGS = $CONF->parse or err(1, "Failed to parse configuration file!", 1); println " Success"; +if (conf_get("die")) { + if ((conf_get("die"))[0][0] == 1) { + println "!!! You didn't read the whole config."; + println "!!! Insert new user then try again."; + exit; + } +} + # Check for required configuration values. my @REQCVALS = qw(locale expire_logs server fantasy_pf); foreach my $REQCVAL (@REQCVALS) { diff --git a/etc/example.conf b/etc/example.conf index 73096b4..4d262d9 100644 --- a/etc/example.conf +++ b/etc/example.conf @@ -73,3 +73,7 @@ fantasy_pf "!"; # Module autoload. module "HelloChan"; + +# Lets see if you read the config. +# Change this to 0 or remove it. +die 1;