diff options
Diffstat (limited to 'source4/setup/provision.pl')
-rwxr-xr-x | source4/setup/provision.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/setup/provision.pl b/source4/setup/provision.pl index 512f0891c0..51c1d29631 100755 --- a/source4/setup/provision.pl +++ b/source4/setup/provision.pl @@ -85,6 +85,13 @@ sub timestring() $year+1900, $mon+1, $mday, $hour, $min, $sec; } +sub datestring() +{ + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time); + return sprintf "%04u%02u%02u%02u", + $year+1900, $mon+1, $mday, $hour; +} + ####################### # substitute a single variable sub substitute($) @@ -135,6 +142,10 @@ sub substitute($) return timestring(); } + if ($var eq "DATESTRING") { + return datestring(); + } + if ($var eq "NEWGUID") { return randguid(); } |