aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-18 10:48:37 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-18 10:48:37 +0100
commitb09b60291c9d4e2d65ec85d980a4af0e41dd1d5d (patch)
treefbda1ff05050a44544bb4faaf71adb6db9480929
parenta3e3231b5dc24fd2dd6ed867f9364705117a2261 (diff)
Moved version check for 1.8.7 later in the server code, such that it doesn't
barf when generating manapges on vanilla etch.
-rwxr-xr-xbin/mauveserver12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/mauveserver b/bin/mauveserver
index 9d1cf53..aea9d8c 100755
--- a/bin/mauveserver
+++ b/bin/mauveserver
@@ -30,12 +30,6 @@ def error(msg)
exit 1
end
-begin
- eval "Proc.new { |a,&b| }"
-rescue SyntaxError => no_blocks_with_procs
- error "mauveserver must have Ruby 1.8.7 or later"
-end
-
help = ARGV.any?{|a| a =~ /-(h|-help)/}
version = ARGV.any?{|a| a =~ /-(V|-version)/}
manual = ARGV.any?{|a| a =~ /-(m|-manual)/}
@@ -71,6 +65,12 @@ puts "#{$0}: version "+Mauve::VERSION if version
exit 0 if help or version or manual
+begin
+ eval "Proc.new { |a,&b| }"
+rescue SyntaxError => no_blocks_with_procs
+ error "mauveserver must have Ruby 1.8.7 or later."
+end
+
configuration_file = ARGV.shift
configuration_file = [".", "/etc/mauvealert/"].collect{|x| File.join("mauveserver.conf") }.find{|d| File.file?(d)} if configuration_file.nil?
configuration_file = File.expand_path(configuration_file)