summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2013-05-17 14:16:26 +0200
committerKai Blin <kai@samba.org>2013-05-18 16:32:38 +0200
commit61a2ad3c020424cead067cbdc89ea6f25708fde4 (patch)
treed682669d810ba291a6afef8a411a5ad5245c0f40 /examples
parenta3a3086a2a35021bcf4dd4d3bcaeb51eb1b44a19 (diff)
downloadsamba-61a2ad3c020424cead067cbdc89ea6f25708fde4.tar.gz
samba-61a2ad3c020424cead067cbdc89ea6f25708fde4.tar.bz2
samba-61a2ad3c020424cead067cbdc89ea6f25708fde4.zip
swat: Remove swat.
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Sat May 18 16:32:38 CEST 2013 on sn-devel-104
Diffstat (limited to 'examples')
-rw-r--r--examples/misc/swat.pl122
1 files changed, 0 insertions, 122 deletions
diff --git a/examples/misc/swat.pl b/examples/misc/swat.pl
deleted file mode 100644
index f6414b6349..0000000000
--- a/examples/misc/swat.pl
+++ /dev/null
@@ -1,122 +0,0 @@
-#! /usr/bin/perl5
-##
-## This is a simple script written by Herb Lewis @ SGI <herb@samba.org>
-## for reporting which parameters are supported by loadparm.c but
-## not by SWAT I just thought it looked fun and might be of interest to others
-## --jerry@samba.org
-##
-## Here is a little info on the usage and output format so you don't have
-## to dig through the code to understand what is printed.
-##
-## Useage: swat.pl [path_to_loadparm.c]
-##
-## The output consists of 4 columns of information
-## Option Name, Global Page, Share Page, Printer Page
-## The section separaters will also be printed (preceded by 16 *) to show
-## which options are grouped in the various sections.
-##
-## If the option name is preceded by an * it means this is a deprecated option.
-## If the option name is preceded by 5 spaces it means this is an alias for the
-## previous option.
-##
-## Under the Global Page, Share Page, and Printer Page columns there will be
-## one of 3 entries, BASIC, ADVANCED, or no. "BASIC" indicates this option will
-## show in the Basic View of that page in SWAT. "ADVANCED" indicates this
-## option will show in the Advanced View of that page in SWAT. "No" indicates
-## that this option is not available on that page in SWAT.
-##
-## Under the Global Page column, if an entry begins with an * it indicates that
-## this is actually specified in Samba as a "service parameter" not a "global
-## parameter" but you can set a default value for this on the Global Page in
-## SWAT.
-##
-## --herb@samba.org
-
-$lastone = "nothing";
-
-if (@ARGV[0]) {
- $filename = @ARGV[0];
-} else {
- $filename = "/usr3/samba20/samba/source/param/loadparm.c";
-}
-
-open (INFILE,$filename) || die "unable to open $filename\n";
-while (not eof(INFILE))
-{
- $_ = <INFILE>;
- last if ( /^static struct parm_struct parm_table/) ;
-}
-print "Option Name Global Page Share Page Printer Page\n";
-print "---------------------------------------------------------------------";
-while (not eof(INFILE))
-{
- $_ = <INFILE>;
- last if (/};/);
- @fields = split(/,/,$_);
- next if not ($fields[0] =~ /^.*{"/);
- $fields[0] =~ s/.*{"//;
- $fields[0] =~ s/"//;
- if ($fields[3] eq $lastone) {
- print " $fields[0]\n";
- next;
- }
- $lastone = $fields[3];
- $fields[2] =~ s/^\s+//;
- $fields[2] =~ s/\s+$//;
- $fields[2] =~ s/}.*$//;
- $fields[6] =~ s/^\s+//;
- $fields[6] =~ s/\s+$//;
- $fields[6] =~ s/}.*$//;
- if ($fields[2] =~ /P_SEPARATOR/) {
- print "\n****************$fields[0]\n";
- next;
- }
- else {
- if ($fields[6] =~ /FLAG_DEPRECATED/) {
- print "*$fields[0]".' 'x(31-length($fields[0]));
- }
- else {
- print "$fields[0]".' 'x(32-length($fields[0]));
- }
- }
- if (($fields[2] =~ /P_GLOBAL/) || ($fields[6] =~ /FLAG_GLOBAL/)) {
- if ($fields[6] =~ /FLAG_GLOBAL/) {
- print "*";
- }
- else {
- print " ";
- }
- if ($fields[6] =~ /FLAG_BASIC/) {
- print "BASIC ";
- }
- else {
- print "ADVANCED ";
- }
- }
- else {
- print " no ";
- }
- if ($fields[6] =~ /FLAG_SHARE/) {
- if ($fields[6] =~ /FLAG_BASIC/) {
- print "BASIC ";
- }
- else {
- print "ADVANCED ";
- }
- }
- else {
- print "no ";
- }
- if ($fields[6] =~ /FLAG_PRINT/) {
- if ($fields[6] =~ /FLAG_BASIC/) {
- print "BASIC";
- }
- else {
- print "ADVANCED";
- }
- }
- else {
- print "no";
- }
- print "\n";
-}