aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/smbfs/examples
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-12-14 11:06:03 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-12-14 11:06:03 +0000
commitf1b9d12761de3c33754f03e6d2a5bf9f1b40aad9 (patch)
tree672d7786f89ed3b67f221098cb86cf0bc53ad5e3 /contrib/smbfs/examples
downloadsrc-f1b9d12761de3c33754f03e6d2a5bf9f1b40aad9.tar.gz
src-f1b9d12761de3c33754f03e6d2a5bf9f1b40aad9.zip
Import smbfs-1.4.1.vendor/smbfs/1.4.1
This is Boris Popov's SMB/CIFS file system implementation for FreeBSD. Obtained from: Boris Popov via ftp://ftp.butya.kz/pub/smbfs/
Notes
Notes: svn path=/vendor/smbfs/dist/; revision=87866 svn path=/vendor/smbfs/1.4.1/; revision=87868; tag=vendor/smbfs/1.4.1
Diffstat (limited to 'contrib/smbfs/examples')
-rw-r--r--contrib/smbfs/examples/dot.nsmbrc57
-rwxr-xr-xcontrib/smbfs/examples/print/lj6l22
-rwxr-xr-xcontrib/smbfs/examples/print/ljspool4
-rw-r--r--contrib/smbfs/examples/print/printcap.sample7
-rwxr-xr-xcontrib/smbfs/examples/print/tolj5
-rw-r--r--contrib/smbfs/examples/smbfs.sh.sample37
6 files changed, 132 insertions, 0 deletions
diff --git a/contrib/smbfs/examples/dot.nsmbrc b/contrib/smbfs/examples/dot.nsmbrc
new file mode 100644
index 000000000000..b630fa8bda40
--- /dev/null
+++ b/contrib/smbfs/examples/dot.nsmbrc
@@ -0,0 +1,57 @@
+# $Id: dot.nsmbrc,v 1.6 2000/07/16 01:52:06 bp Exp $
+#
+# Example for .nsmbrc file
+#
+# smbfs lookups configuration files in next order:
+# 1. ~/.nsmbrc
+# 2. /usr/local/etc/nsmb.conf - if this file found it will
+# override values with same keys from user files.
+#
+#
+# This file consist from a set of sections. Each section started by section name
+# surrounded with square brackets:
+# [section_name]
+#
+# End of the section marked either by new section or by the end of file.
+# Each section can contain zero or more parameters:
+# [section_name]
+# key=value
+#
+# where 'key' represents parameter name and 'value' a value assigned
+# to this parameter.
+#
+# SMB library uses next forms of section names:
+# A) [default]
+# B) [SERVER]
+# C) [SERVER:USER]
+# D) [SERVER:USER:SHARE]
+#
+# Here is the map of possible keywords:
+#
+# keyword/section A B C D Comment
+#
+# addr - + - - IP or IPX address of SMB server
+# charsets - + + + local:remote charset pair
+# nbns + + - - address of NetBIOS name server (WINS)
+# nbscope + + - - NetBIOS scope
+# nbtimeout + + - - timeout for NetBIOS name servers
+# password - - + + a plain text password used to access to the given share
+# retry_count + + - - number of retries before connection marked as broken
+# timeout + + - - SMB request timeout
+# workgroup + + + + name of workgroup
+#
+
+# A simple configuration example:
+
+# First, define a workgroup.
+[default]
+workgroup=SALES
+
+# The 'FSERVER' is an NT server.
+[FSERVER]
+charsets=koi8-r:cp866
+addr=fserv.coolcorp.com
+
+[FSERVER:JOE]
+# use persistent password cache for user 'joe'
+password=$$1767877DF
diff --git a/contrib/smbfs/examples/print/lj6l b/contrib/smbfs/examples/print/lj6l
new file mode 100755
index 000000000000..578611a32f2b
--- /dev/null
+++ b/contrib/smbfs/examples/print/lj6l
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Sample input filter to print on HP Laser Jet printers
+# Installed in /usr/local/libexec/hp6l
+
+DEVICE="ljet3"
+PAPERSIZE="a4"
+
+printf "\033&k2G" || exit 2
+
+read first_line
+first_two_chars=`expr "$first_line" : '\(..\)'`
+
+if [ "$first_two_chars" = "%!" ]; then
+ exec 3>&1 1>&2
+ /usr/local/bin/gs -sPAPERSIZE=${PAPERSIZE} -dSAFER -dNOPAUSE -q -sDEVICE=${DEVICE} \
+ -sOutputFile=/dev/fd/3 - && exit 0
+else
+ echo $first_line && cat && printf "\033&l0H" && exit 0
+fi
+
+exit 2
diff --git a/contrib/smbfs/examples/print/ljspool b/contrib/smbfs/examples/print/ljspool
new file mode 100755
index 000000000000..32b09ea56d41
--- /dev/null
+++ b/contrib/smbfs/examples/print/ljspool
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+/usr/local/libexec/lj6l | /usr/local/libexec/tolj && exit 0
+exit 2
diff --git a/contrib/smbfs/examples/print/printcap.sample b/contrib/smbfs/examples/print/printcap.sample
new file mode 100644
index 000000000000..6d1e8992ad86
--- /dev/null
+++ b/contrib/smbfs/examples/print/printcap.sample
@@ -0,0 +1,7 @@
+# $Id: printcap.sample,v 1.1 2000/06/11 08:13:28 bp Exp $
+
+# Sample printcap entry for NetWare printer
+fserverlj|LJ6L on the fserver:\
+ :sh:lp=/dev/null:\
+ :if=/usr/local/libexec/ljspool: \
+ :sd=/var/spool/output/nwhost:lf=/var/log/lpd-errs:
diff --git a/contrib/smbfs/examples/print/tolj b/contrib/smbfs/examples/print/tolj
new file mode 100755
index 000000000000..e74cb90a7506
--- /dev/null
+++ b/contrib/smbfs/examples/print/tolj
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+QUEUE="//joe@fserver/lj"
+
+/usr/local/bin/smbutil print ${QUEUE} -
diff --git a/contrib/smbfs/examples/smbfs.sh.sample b/contrib/smbfs/examples/smbfs.sh.sample
new file mode 100644
index 000000000000..7908de26cc64
--- /dev/null
+++ b/contrib/smbfs/examples/smbfs.sh.sample
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $Id: smbfs.sh.sample,v 1.3 2001/01/13 04:50:36 bp Exp $
+#
+# Location: /usr/local/etc/rc.d/smbfs.sh
+#
+# Simple script to mount smbfs file systems at startup.
+# It assumes that all mount points described in fstab file and password
+# entries listed in /root/.nsmbrc file. See mount_smbfs(8) for details.
+#
+
+mount="/sbin/mount -o -N"
+umount=/sbin/umount
+HOME=/root; export HOME
+vols=`awk -- '/^\/.*[[:space:]]+smbfs[[:space:]]+/ { print $2 }' /etc/fstab`
+
+case "$1" in
+start)
+ echo -n "smbfs: "
+ for vol in ${vols}; do
+ $mount $vol
+ echo -n "$vol "
+ done
+ ;;
+stop)
+ echo -n "unmounting smbfs mount points: "
+ for vol in ${vols}; do
+ $umount $vol
+ echo -n "$vol "
+ done
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ exit 64
+esac
+
+echo "Done"