Merge branch 'master' of git://git.distorted.org.uk/~mdw/ca
authorMark Wooding <mdw@distorted.org.uk>
Wed, 2 Jan 2013 19:44:26 +0000 (19:44 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 2 Jan 2013 19:44:26 +0000 (19:44 +0000)
* 'master' of git://git.distorted.org.uk/~mdw/ca:
  bin/withdraw: Lowercase `u' in `usage:', for consistency.
  bin/withdraw: Make sure the database is actually open.

bin/withdraw

index ed6e740..4f67086 100755 (executable)
 ## Find the common utilities.
 source [file join [file dirname $argv0] "../lib/func.tcl"]
 
+## Open the database
+sqlite3 db "$CERTROOT/state/ca.db"
+db nullvalue nil
+cd "$CERTROOT"
+
 ## Get the list of requests.
 if {[llength $argv] != 1} {
-  puts stderr "Usage: $QUIS REQID"
+  puts stderr "usage: $QUIS REQID"
   exit 1
 }
 lassign $argv reqid