iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37aa144
)
fix race condition
author
Ian Kelling
<ian@iankelling.org>
Tue, 22 Oct 2019 14:30:03 +0000
(10:30 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Tue, 22 Oct 2019 14:30:03 +0000
(10:30 -0400)
btrbk was unmounting, then rootsshsync was killing off files in
/root/.ssh when thing were unmounted.
rootsshsync
patch
|
blob
|
history
diff --git
a/rootsshsync
b/rootsshsync
index c4cebbf5660b56b7c305d184a46dbc826ffb1377..1a39d463494954d3f9f890a88a058345a86905d6 100755
(executable)
--- a/
rootsshsync
+++ b/
rootsshsync
@@
-33,6
+33,10
@@
if [[ $SUDO_USER ]]; then
fi
user_ssh_dir=$(eval echo ~$user)/.ssh
+if [[ ! -s $user_ssh_dir/config ]]; then
+ echo missing $user_ssh_dir/config. bad sign. bailing >&2
+ exit 1
+fi
# remove broken links, or else rsync has error about them.
find $user_ssh_dir -xtype l -exec rm '{}' \;