X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=conflink;h=55d7a02489dc6b1d1ae3cbf7d0f3152778d73215;hb=6061d88c7d5beda3e974943eb8676f7c39d4ae9f;hp=d72f98c29e775a1aa7b6bbf9c0a7689687864c3c;hpb=37aa1445e9d2153402400f9304615ce94233dd79;p=distro-setup diff --git a/conflink b/conflink index d72f98c..55d7a02 100755 --- a/conflink +++ b/conflink @@ -1,7 +1,7 @@ #!/bin/bash source /a/bin/errhandle/err -_errcatch_cleanup() { +errcatch-cleanup() { echo 1 >~/.local/conflink } @@ -24,12 +24,13 @@ m() { s() { sudo "$@"; } lnf() { /a/exe/lnf "$@"; } -now=$(date +%s) -f=~/.local/conflink -fast=false -if [[ -e $f ]] && (( $(stat -c %Y $f) > $now - 60*60*24 )); then - fast=true -fi + +# error prone +#f=~/.local/conflink +# fast=false +# if [[ -e $f ]] && (( $(stat -c %Y $f) > $now - 60*60*24 )); then +# fast=true +# fi if [[ $1 == -f ]]; then # f for fast fast=true shift @@ -87,10 +88,13 @@ common-file-setup() { # but I haven't looked at the symlinks. # s rsync -n -ahviSAXPH --specials --devices --chown=root:root --chmod=g-s $fs / # note, symlinks get resolved, not copied. - if s tar --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -dz -C / | grep /etc/systemd &>/dev/null; then + if s tar --anchored \ + --exclude etc/dovecot/users \ + --exclude etc/exim4/passwd \ + --exclude etc/exim4/*.pem \ + --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -dz -C / | grep /etc/systemd &>/dev/null; then systemd_reload=true fi - s tar --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -xz -C / fi if [[ -e $dir/subdir_files ]]; then