From: Ian Kelling Date: Wed, 15 May 2019 20:40:49 +0000 (-0400) Subject: stop unneded changes to /q, making for extra btrfs snapshots X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=commitdiff_plain;h=547052c0f1697e6e12668d62693d1c21263a094a stop unneded changes to /q, making for extra btrfs snapshots The old rsync command makes for a timestamp change on the links --- diff --git a/rootsshsync b/rootsshsync index a4db227..90928c6 100755 --- a/rootsshsync +++ b/rootsshsync @@ -18,14 +18,14 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR [[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@" -if test -e /q/root/.ssh; then - dest=/q/root/.ssh - /a/exe/lnf $dest /root -else - dest=/root/.ssh - mkdir -p $dest - chmod 700 $dest +dest=/root/.ssh + +# leftover +if [[ -L $dest ]]; then + rm $dest fi +mkdir -p $dest +chmod 700 $dest user_ssh_dir=$(eval echo ~${SUDO_USER:-$USER})/.ssh