Univention Bugzilla – Bug 44694
sysvol-sync.sh stops working if homedir for Samba/AD DCs is not /dev/null (4.2)
Last modified: 2017-12-12 07:52:20 CET
Created attachment 8881 [details] fix-sysvol-sync.patch sysvol-sync.sh stops working if homedir for Samba/AD DCs in not /dev/null. In that case it never synchronizes anything from that DC. The sed expression used in the check_if_need_sync function suffers from a sed feature called "Relentness" here: http://sed.sourceforge.net/sedfaq3.html#s3.3 It's surprisingly difficult to create a sed expression for this use case. The attached patch avoids sed at this point.
I fixed this along with Bug #43620.
I would prefer something like this -> univention-ssh-rsync /etc/machine.secret --dry-run --out-format='%n' \ -auAX --dirs-update --delete \ 'slave$@master:/var/lib/samba/sysvol/' \ /var/cache/univention-samba4/sysvol-sync/.master 2>/dev/null deleting four.two/Policies/{085209BD-1E7A-4E08-A0BF-C4764CE9DA82}/User/ deleting four.two/Policies/{085209BD-1E7A-4E08-A0BF-C4764CE9DA82}/Machine/ deleting four.two/Policies/{085209BD-1E7A-4E08-A0BF-C4764CE9DA82}/GPT.INI deleting four.two/Policies/{085209BD-1E7A-4E08-A0BF-C4764CE9DA82}/ four.two/Policies/ four.two/Policies/{6AC1786C-016F-11D2-945F-00C04FB984F9}/ without -v, -> no putput with 2>/dev/null -> removes the "Could not chdir to home directory /dev/null..." message with --out-format='%n', print changes This way we don't need to grep/tail/sed the output, if there is output, there are changes.
Request rejected
OK - sysvol-sync.sh with unixHome != /dev/null (but lets hope rsync output format does not change) OK - YAML
<http://errata.software-univention.de/ucs/4.2/42.html>