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:
parent
3db568eb6b
commit
9679f20272
7
testprogs/ejs/argv.js
Normal file
7
testprogs/ejs/argv.js
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
demonstrate use of argv
|
||||
*/
|
||||
|
||||
println("You called this script with arguments:");
|
||||
|
||||
printVars(ARGV);
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user