- # note, symlinks get resolved, not copied.
- s tar --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -xz -C /
+ while read -r line; do
+ file="${line:12}"
+ case $file in
+ etc/systemd/system/*)
+ reload_systemd=true
+ ;;
+ etc/dnsmasq.d/*)
+ restart_services+=(dnsmasq)
+ ;;
+ esac
+ # Previously did this with tar, but it doesn't
+ # update directory permissions.
+ #
+ # S = do spare files efficiently
+ # A = preserve acls
+ # X = preserve extended attributes
+ # i = itemize
+ done < <(s rsync -aiSAX --chown=root:root --chmod=g-s \
+ --exclude=/etc/dovecot/users \
+ --exclude='/etc/exim4/passwd*' \
+ --exclude='/etc/exim4/*.pem' \
+ $fs/ /)