aboutsummaryrefslogtreecommitdiff
path: root/captain/captain.f90
diff options
context:
space:
mode:
Diffstat (limited to 'captain/captain.f90')
-rw-r--r--captain/captain.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/captain/captain.f90 b/captain/captain.f90
index 6713a9e..46287d9 100644
--- a/captain/captain.f90
+++ b/captain/captain.f90
@@ -82,6 +82,7 @@ contains
subroutine parse_options
use config
use m_crypt
+ use m_uuid, only: generate_uuid4
use captain_db, only: new_admin_db
implicit none
@@ -122,6 +123,18 @@ contains
Print *, "Unverify: "//trim(option)//"X", verify_hash(trim(option)//"X", tmp)
stop
+ ! This option also shouldn't be public, and it verifies that
+ ! uuids can be generated
+ else if(trim(option) == "--uuid") then
+ if(.not. config_loaded) then
+ ! Look up a directory for temp files - needed below
+ call get_environment_variable("TEMP", temp_dir)
+ end if
+
+ option = generate_uuid4()
+ print *, trim(option)
+ stop
+
else if(trim(option) == "--new-admin") then
! Config better be loaded by now...