From c17166fb3d9260d0c02e3f9f559413acde5ce048 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 May 2008 02:04:00 +0200 Subject: Convert smbstatus to Python. (This used to be commit f14ad6cd92227c7ed5c570b581e5db82b7d42e25) --- source4/scripting/bin/smbstatus | 159 ++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 96 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/bin/smbstatus b/source4/scripting/bin/smbstatus index 4dfc3365a1..782e83e4cf 100755 --- a/source4/scripting/bin/smbstatus +++ b/source4/scripting/bin/smbstatus @@ -1,96 +1,63 @@ -#!/bin/sh -exec smbscript "$0" ${1+"$@"} -/* - provide information on connected users and open files - Copyright Andrew Tridgell 2005 - Released under the GNU GPL version 3 or later -*/ - -libinclude("base.js"); -libinclude("management.js"); - -var options = new Object(); - -options = GetOptions(ARGV, - "POPT_AUTOHELP", - "POPT_COMMON_SAMBA", - "POPT_COMMON_VERSION", - "nbt"); -if (options == undefined) { - println("Failed to parse options: " + options.ERROR); - return -1; -} - -/* - show open sessions -*/ -function show_sessions() -{ - var sessions = smbsrv_sessions(); - var i; - var sys = sys_init(); - if (sessions == undefined) { - println("No sessions open"); - return; - } - printf("User Client Connected at\n"); - printf("-------------------------------------------------------------------------------\n"); - for (i=0;i