From 547052c0f1697e6e12668d62693d1c21263a094a Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 15 May 2019 16:40:49 -0400 Subject: [PATCH] stop unneded changes to /q, making for extra btrfs snapshots The old rsync command makes for a timestamp change on the links --- rootsshsync | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 -- 2.30.2