samba: Refactored samba module to use templates.
This commit is contained in:
parent
734fbfdace
commit
5309521c18
6 changed files with 430 additions and 123 deletions
|
@ -13,7 +13,7 @@ WINSSERVER=`echo '' | testparm -v --section-name global 2> /dev/null | \
|
|||
if [ "${WINSSERVER}" = "" ]; then
|
||||
NMBLOOKUP="nmblookup"
|
||||
else
|
||||
NMBLOOKUP="nmblookup -r ${WINSSERVER}"
|
||||
NMBLOOKUP="nmblookup -R -U ${WINSSERVER}"
|
||||
fi
|
||||
PDC=`${NMBLOOKUP} "${WORKGROUP}#1B" | \
|
||||
sed -n "s/^\([0-9\.]*\) ${WORKGROUP}<1b>/\1/p" | head -1`
|
||||
|
@ -62,6 +62,10 @@ if [ $? -ne 0 ]; then
|
|||
echo "Error in netlogon sync, rsync failed"
|
||||
exit 1
|
||||
fi
|
||||
chcon -Rh -u system_u -t samba_share_t ${TARGETDIR}/
|
||||
which restorecon > /dev/null 2>&1
|
||||
if [ $# -eq 0 ]; then
|
||||
restorecon -r ${TARGETDIR}
|
||||
fi
|
||||
|
||||
rm -rf ${TMPDIR}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue