s3: libsmb: In cli_qpathinfo_send() (SMBtrans2:TRANSACT2_QPATHINFO) check for DFS...
[Samba.git] / source3 / script / smbchangeshare
blob098e9682769878efd0bdd930be47199d8cc6448c
1 #!/bin/sh
3 # smbchangeshare
5 # Copyright (C) 2015 Christof Schmitt
7 # Example script that can be used with the 'change share command'
8 # config option. This is mainly intended for use in the Samba selftest
9 # suite, please review and adapt it before using elsewhere.
12 CONF="$1"
13 SHARENAME="$2"
14 SHAREPATH="$3"
15 COMMENT="$4"
16 MAX_CONN="$5"
17 CSC_POLICY="$6"
19 NETCONF="$BINDIR/net --configfile=$CONF conf"
21 $NETCONF setparm "$SHARENAME" 'path' "$SHAREPATH"
22 RC=$?
23 if [ $RC -ne 0 ]; then
24 echo Failure during setparm for path: rc=$RC
25 exit $RC
28 $NETCONF setparm "$SHARENAME" 'comment' "$COMMENT"
29 RC=$?
30 if [ $RC -ne 0 ]; then
31 echo Failed during setparm for comment: rc=$RC
32 exit $RC
35 $NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN"
36 RC=$?
37 if [ $RC -ne 0 ]; then
38 echo Failure during setparm for max connections: rc=$RC
39 exit $RC
42 $NETCONF setparm "$SHARENAME" 'csc policy' "$CSC_POLICY"
43 RC=$?
44 if [ $RC -ne 0 ]; then
45 echo Failure during setparm for csc policy: rc=$RC
46 exit $RC