Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/sanity-check
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sanity-check')
-rwxr-xr-xbin/sanity-check32
1 files changed, 31 insertions, 1 deletions
diff --git a/bin/sanity-check b/bin/sanity-check
index df273fa..e93a157 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -137,6 +137,10 @@ while [ $# -gt 0 ]; do
master-mirror-availability)
+ [ ${silence} -gt 0 ] || \
+ printf 'checking if master mirror can be reached ...' | \
+ tee -a "${tmp_dir}/messages" >&2
+
for host in $(
printf '%s\n' \
"${master_mirror_sftp_command}" \
@@ -150,7 +154,7 @@ while [ $# -gt 0 ]; do
); do
if ! ping -c1 "${host}" >/dev/null 2>&1; then
if [ ${silence} -le 1 ]; then
- printf '\nThe master mirror %s cannot be reached.\n' \
+ printf '\nThe master mirror %s cannot be pinged.\n' \
"${host}" | \
tee -a "${tmp_dir}/messages" >&2
fi
@@ -160,6 +164,32 @@ while [ $# -gt 0 ]; do
fi
done
+ if ! ${master_mirror_rsync_command} ${master_mirror_rsync_directory} >/dev/null 2>&1; then
+ if [ ${silence} -le 1 ]; then
+ printf '\nThe master mirror %s cannot be reached via rsync.\n' \
+ "${host}" | \
+ tee -a "${tmp_dir}/messages" >&2
+ fi
+ i_am_insane
+ # if the master mirror cannot be reached, further tests do not make any sense
+ set --
+ fi
+
+ if ! ${master_mirror_sftp_command} </dev/null >/dev/null 2>&1; then
+ if [ ${silence} -le 1 ]; then
+ printf '\nThe master mirror %s cannot be reached via sftp.\n' \
+ "${host}" | \
+ tee -a "${tmp_dir}/messages" >&2
+ fi
+ i_am_insane
+ # if the master mirror cannot be reached, further tests do not make any sense
+ set --
+ fi
+
+ [ ${silence} -gt 0 ] || \
+ echo ' passed.' | \
+ tee -a "${tmp_dir}/messages" >&2
+
;;
git-repositories)