summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs')
-rw-r--r--testprogs/ejs/argv.js7
-rw-r--r--testprogs/ejs/loadparm.js11
2 files changed, 15 insertions, 3 deletions
diff --git a/testprogs/ejs/argv.js b/testprogs/ejs/argv.js
new file mode 100644
index 0000000000..2f8dc74174
--- /dev/null
+++ b/testprogs/ejs/argv.js
@@ -0,0 +1,7 @@
+/*
+ demonstrate use of argv
+*/
+
+println("You called this script with arguments:");
+
+printVars(ARGV);
diff --git a/testprogs/ejs/loadparm.js b/testprogs/ejs/loadparm.js
index fdeaed9d34..6c2a80bb73 100644
--- a/testprogs/ejs/loadparm.js
+++ b/testprogs/ejs/loadparm.js
@@ -2,14 +2,18 @@
demonstrate access to loadparm functions from ejs
*/
-print("defined services: ");
-printVars(lpServices());
-
function showParameter(name) {
print(name + ": ");
printVars(lpGet(name));
}
+for (v in ARGV) {
+ showParameter(ARGV[v]);
+}
+
+print("defined services: ");
+printVars(lpServices());
+
showParameter("server services");
showParameter("netbios name");
showParameter("security");
@@ -17,3 +21,4 @@ showParameter("workgroup");
showParameter("log level");
showParameter("server signing");
showParameter("interfaces");
+