iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix ssh wrapper
[distro-setup]
/
rootsshsync
diff --git
a/rootsshsync
b/rootsshsync
index c4cebbf5660b56b7c305d184a46dbc826ffb1377..668f8a3d7ed931ea2a65130c050b9c7e9326ca66 100755
(executable)
--- a/
rootsshsync
+++ b/
rootsshsync
@@
-33,6
+33,10
@@
if [[ $SUDO_USER ]]; then
fi
user_ssh_dir=$(eval echo ~$user)/.ssh
fi
user_ssh_dir=$(eval echo ~$user)/.ssh
+if [[ ! -s $user_ssh_dir/authorized_keys ]]; then
+ echo missing $user_ssh_dir/authorized_keys. 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 '{}' \;
# remove broken links, or else rsync has error about them.
find $user_ssh_dir -xtype l -exec rm '{}' \;