Skip to content

Commit

Permalink
Merge pull request samba-team#16 in PKG/samba from ~CKALLIANPUR/samba…
Browse files Browse the repository at this point in the history
…:bugFix to debian/dvm6

* commit '82566270a0512dbe022cbdd37002f6d244a9e9c0':
  HYP-2140 - Addressed review comments
  HYP-2140 - Addressed review comments
  HYP-2140 - delete svt-samba-server.override if running on HyperV
  HYP-2309 - Set aio read and write sizes to 1
  • Loading branch information
Jeff Slovin committed Jun 28, 2016
2 parents 0714722 + 8256627 commit 18b5567
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
5 changes: 2 additions & 3 deletions debian/smb.conf
Expand Up @@ -32,6 +32,5 @@
kernel oplocks = no
posix locking = no
durable handles = yes
aio read size = 4096
aio write size = 4096

aio read size = 1
aio write size = 1
31 changes: 6 additions & 25 deletions debian/svt-samba-init
Expand Up @@ -11,6 +11,7 @@
# ask_retry "<cmd>"
# NULL/Empty command would cause just the prompt. Skip/Abort out of the prompt as needed.
#
env APPSETUP="/var/tmp/build/bin/appsetup"
ask_retry()
{
cmd="$1"
Expand Down Expand Up @@ -285,20 +286,10 @@ echo "CMD $CMD"

deploy_samba()
{
. "$APPSETUP"

get_samba_specific_defines

if [ `iptables -L | head -4 | grep -c "anywhere *$"` -lt 1 ]
then
echo IPTables is not open enough, injecting rule...
iptables -I INPUT -j ACCEPT
echo IPTables is updated to accept all incoming traffic
else
echo IPTables looks good
fi

${SRCPATH}/fw.stop

setup_domain_networking

echo Starting to update Samba on the DVM and integrate with Windows domain...
Expand Down Expand Up @@ -356,6 +347,9 @@ deploy_samba()

net rpc rights grant '$GROUP_NAME\\Domain Admins' SeDiskOperatorPrivilege -U$ADMIN_USER%$ADMIN_PASSWD

# Delete the upstart override file for samba when running on HyperV
[ `grep -ic provider.hyperv $SVTCONF` -eq 1 ] && (rm /etc/init/svt-samba-server.override)

echo "SVT Samba One-time Initialization done."
}

Expand Down Expand Up @@ -431,18 +425,7 @@ prep_predeploy_and_exit()
wget -N http://10.0.0.85/captures/SierraNevada/resetTia
wget -N http://10.0.0.85/captures/SierraNevada/winexe
chmod +x winexe
cat > fw.stop << EOT
#!/bin/sh
echo "Stopping firewall and allowing everyone..."
iptables -F
iptables -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
EOT
cat > DEFS << EOT
cat > DEFS << EOT
### Fill these out to avoid fat fingering! Examples are provided as comments (#) below.
### This file is sourced into bash at the beginning of the install script.
Expand Down Expand Up @@ -482,8 +465,6 @@ EXIT_ON_ERROR=1
EOT
fi

chmod +x fw.stop

if [ ! -d ${SAMBAPDIR}/samba ]; then
mv /var/lib/samba ${SAMBAPDIR}/
ln -s ${SAMBAPDIR}/samba /var/lib/
Expand Down

0 comments on commit 18b5567

Please sign in to comment.