r/samba-dc: sysvolsync: Fix running on fresh DC
On a new DC, the `idmap.ldb` file does not yet exist the first time `sysvolsync` runs. This causes a syntax error in the condition that checks the modification timestamp of the file.chrony
parent
c814007c6d
commit
3e70600691
|
@ -64,7 +64,7 @@ debug "Copying idmap.ldb from ${pdc}"
|
|||
rsync -a${DEBUG+i} --delete "${pdc}:${IDMAP_LDB}.bak" "${IDMAP_LDB}.new"
|
||||
st_new=$(stat -c %Y "${IDMAP_LDB}.new")
|
||||
st_cur=$(stat -c %Y "${IDMAP_LDB}")
|
||||
if [ "${st_new}" -ne "${st_cur}" ]; then
|
||||
if [ -z "${st_cur}" ] || [ "${st_new}" != "${st_cur}" ]; then
|
||||
info "Got updated idmap.ldb from ${pdc}"
|
||||
info 'Stopping Samba service'
|
||||
systemctl stop samba || exit
|
||||
|
|
Loading…
Reference in New Issue