summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-09-27 20:45:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:22 -0500
commitdb6c6cfdec4d00b034d5dfed7cc5b533f2d53db4 (patch)
tree1638a076fcc490f2540bc2af48321d3eec5b150f /source4/scripting
parent5e2f9cd8e223368d38d49cf60f199bbd818b8732 (diff)
downloadsamba-db6c6cfdec4d00b034d5dfed7cc5b533f2d53db4.tar.gz
samba-db6c6cfdec4d00b034d5dfed7cc5b533f2d53db4.tar.bz2
samba-db6c6cfdec4d00b034d5dfed7cc5b533f2d53db4.zip
r25383: Patch from Amin Azez <azez@ufomechanic.net> to give better message
when a template file is missing. Andrew Bartlett (This used to be commit 5093ea1cef910fe01a249b2d7ef602e2374e2b35)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/libjs/provision.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index f204bcc9cc..870e33f84a 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -355,6 +355,11 @@ function setup_file(template, message, fname, subobj)
var f = fname;
var src = lp.get("setup directory") + "/" + template;
+ if (! sys.stat(src)) {
+ message("Template file not found: %s\n",src);
+ assert(0);
+ }
+
sys.unlink(f);
var data = sys.file_load(src);