summaryrefslogtreecommitdiffstats
path: root/source3/script
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-15 18:57:41 +0000
committerGerald Carter <jerry@samba.org>2003-01-15 18:57:41 +0000
commit99cdb462083381c88689a4e698ca48b6ed4cf5ac (patch)
tree7ea530c74c8fd1ef65eec52410b7843e63d89f8f /source3/script
parent35fa2e5975f9b380e6e63471413df6f4182c164b (diff)
downloadsamba-99cdb462083381c88689a4e698ca48b6ed4cf5ac.tar.gz
samba-99cdb462083381c88689a4e698ca48b6ed4cf5ac.tar.xz
samba-99cdb462083381c88689a4e698ca48b6ed4cf5ac.zip
*lots of small merges form HEAD
*sync up configure.in *don't build torture tools in make all *make sure to remove torture tools as part of make clean (This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef)
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/findsmb.in21
-rwxr-xr-xsource3/script/installmodules.sh10
2 files changed, 24 insertions, 7 deletions
diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in
index d2aa94591b..5ca1d8082a 100755
--- a/source3/script/findsmb.in
+++ b/source3/script/findsmb.in
@@ -5,7 +5,7 @@
# run as root to get correct info from WIN95 clients.
#
# syntax:
-# findsmb [subnet broadcast address]
+# findsmb [-d|-D] [-r] [subnet broadcast address]
#
# with no agrument it will list machines on the current subnet
#
@@ -13,21 +13,28 @@
# local master browsers for that workgroup. There will be an "*" in front
# of the workgroup name for machines that are the domain master browser for
# that workgroup.
+#
+# Options:
+#
+# -d|-D enable debug
+# -r add -r option to nmblookup when finding netbios name
#
$SAMBABIN = "@prefix@/bin";
-for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+for ($i = 0; $i < 2; $i++) { # test for -d and -r options
$_ = shift;
if (m/-d|-D/) {
$DEBUG = 1;
- } else {
- if ($_) {
- $BCAST = "-B $_";
- }
+ } else (m/-r/) {
+ $R_OPTION = "-r";
}
}
+if ($_) { # set broadcast address if it was specified
+ $BCAST = "-B $_";
+}
+
sub ipsort # do numeric sort on last field of IP address
{
@t1 = split(/\./,$a);
@@ -56,7 +63,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
# find the netbios names registered by each machine
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip|") ||
die("Can't get nmb name list.\n");
@nmblookup = <NMBLOOKUP>;
close NMBLOOKUP;
diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh
index 9b9d950ca2..ec5691992d 100755
--- a/source3/script/installmodules.sh
+++ b/source3/script/installmodules.sh
@@ -7,6 +7,16 @@ shift
shift
shift
+for d in $BASEDIR $LIBDIR; do
+if [ ! -d $d ]; then
+mkdir $d
+if [ ! -d $d ]; then
+ echo Failed to make directory $d
+ exit 1
+fi
+fi
+done
+
for p in $*; do
p2=`basename $p`
echo Installing $p as $LIBDIR/$p2