[csw-devel] SF.net SVN: opencsw:[423] catalog_signatures/bin/catalog_gpg

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Jul 21 05:07:21 CEST 2011


Revision: 423
          http://opencsw.svn.sourceforge.net/opencsw/?rev=423&view=rev
Author:   bdwalton
Date:     2011-07-21 03:07:21 +0000 (Thu, 21 Jul 2011)

Log Message:
-----------
tell catalog_gpg webrick daemon to use DAEMON_GPG from the env for gpg home by default

Signed-off-by: Ben Walton <bwalton at opencsw.org>

Modified Paths:
--------------
    catalog_signatures/bin/catalog_gpg

Modified: catalog_signatures/bin/catalog_gpg
===================================================================
--- catalog_signatures/bin/catalog_gpg	2011-07-21 03:07:01 UTC (rev 422)
+++ catalog_signatures/bin/catalog_gpg	2011-07-21 03:07:21 UTC (rev 423)
@@ -25,7 +25,7 @@
 opts.port = 9981
 opts.mirror_path = File.join(File.dirname($0), '..')
 opts.gpg = OpenStruct.new
-opts.gpg.home = File.join(File.dirname($0), '..', 'gpg')
+opts.gpg.home = ENV['DAEMON_GPG']
 opts.gpg.bin = '/opt/csw/bin/gpg'
 
 OptionParser.new do |o|
@@ -45,6 +45,11 @@
   o.on('-p', '--port PORT', "Use a port other than #{opts.port}") { |p| opts.port = p.to_i }
 end.parse!
 
+if o.gpg.home.nil?
+  $stderr.puts "Can't start daemon without a valid DAEMON_GPG in the environment"
+  exit 1
+end
+
 server = WEBrick::HTTPServer.new({ :Port => opts.port })
 
 # create a valid mount for each type of signature we'll return and for


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list