1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r7076: added demos of using ARGV[]

This commit is contained in:
Andrew Tridgell 2005-05-29 11:58:47 +00:00 committed by Gerald (Jerry) Carter
parent 3db568eb6b
commit 9679f20272
2 changed files with 15 additions and 3 deletions

7
testprogs/ejs/argv.js Normal file
View File

@ -0,0 +1,7 @@
/*
demonstrate use of argv
*/
println("You called this script with arguments:");
printVars(ARGV);

View File

@ -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");