From 2dce83de0c4de67f15e95456d6a63864d2f6ad85 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 12 Jul 2005 02:36:07 +0000 Subject: r8338: - added a substitute_var() js library function for doing hash driven substitution of variables in strings - the js provision script now correctly processes provision.ldif (This used to be commit c2946003e06c4898ba0444cd0b69d3203753be94) --- source4/setup/provision | 163 ++++++++++++++++++------------------------------ 1 file changed, 61 insertions(+), 102 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index b01ec97a86..86bc49e537 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -5,7 +5,7 @@ Released under the GNU GPL v2 or later */ -options = new Object(); +var options = new Object(); ok = GetOptions(ARGV, options, "POPT_AUTOHELP", "POPT_COMMON_SAMBA", @@ -35,6 +35,9 @@ if (ok == false) { libinclude("base.js"); +/* used to generate sequence numbers for records */ +next_usn = 1; + /* print a message if quiet is not set */ @@ -46,139 +49,88 @@ function message(s) } /* - find a username from a list of possibilities + find a user or group from a list of possibilities */ -function finduser() +function findnss() { - var i, name = arguments[0]; - if (options[name] != undefined) { - return options[name]; - } - for (i=1;i= 2); + var nssfn = arguments[0]; + var name = arguments[1]; if (options[name] != undefined) { return options[name]; } - for (i=1;i