summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2012-02-25 21:17:04 +0100
committerTimo Weingärtner <timo@tiwe.de>2012-02-25 21:17:04 +0100
commite5b99e36d96614d059137f3df323bcc39ead369e (patch)
tree67a3b5b716614514ee303fb7f9ec1173d04eafcf
parent550c2f513a05899566ca90a1e859218ee44a8ac7 (diff)
downloadopenssh-known-hosts-debian/0.4.tar.gz
Imported Debian version 0.4debian/0.4
-rw-r--r--README2
-rw-r--r--debian/changelog9
-rw-r--r--debian/control2
-rwxr-xr-xplugins/curl5
-rwxr-xr-xupdate-openssh-known-hosts8
5 files changed, 21 insertions, 5 deletions
diff --git a/README b/README
index bcbbf4e..54c06ca 100644
--- a/README
+++ b/README
@@ -9,6 +9,8 @@ Basic variables:
* EXIT_IGNORE: space-seperated list of exitcodes which should be ignored, no
update is performed for this source then (optional)
+The rest of the variables is plugin-specific.
+
For examples see /usr/share/doc/openssh-known-hosts/examples/*.
Writing a plugin:
diff --git a/debian/changelog b/debian/changelog
index c505714..7791a73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+openssh-known-hosts (0.4) fsmi-squeeze; urgency=low
+
+ * Don't update ssh_known_hosts if nothing changed.
+ * Plugin curl: Allow passing of CURL_OPTIONS.
+ * Update copyright years.
+ * Bump Standards-Version to 3.9.0.
+
+ -- Timo Weingärtner <timo@tiwe.de> Sat, 10 Jul 2010 02:11:40 +0200
+
openssh-known-hosts (0.3) fsmi-squeeze; urgency=low
* Bump Standards-Version to 3.8.4, no changes needed.
diff --git a/debian/control b/debian/control
index 632ed44..5c6e234 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: net
Priority: extra
Maintainer: Timo Weingärtner <timo@tiwe.de>
Build-Depends: debhelper (>= 7)
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
Package: openssh-known-hosts
Architecture: all
diff --git a/plugins/curl b/plugins/curl
index 5964613..6f803b3 100755
--- a/plugins/curl
+++ b/plugins/curl
@@ -4,6 +4,7 @@
#
# ENVIRONMENT VARIABLES:
# URL URL to download known_hosts file from
+# CURL_OPTIONS options passed to curl
# SIGURL URL of the GnuPG signature
# KEYRING path to the keyring for use by gpgv
#
@@ -11,12 +12,12 @@
set -e
if [ "${SIGURL}" ]; then
- curl -Rz "./current" -m 300 -o new.sig "${SIGURL}" -o new "${URL}"
+ curl -Rz "./current" -m 300 ${CURL_OPTIONS} -o new.sig "${SIGURL}" -o new "${URL}"
[ -e new ] || exit 0
gpgv --keyring "${KEYRING}" --status-fd 2 new.sig || exit 1
# return 1 because it's not clear what other codes may used
else
- curl -Rz "./current" -m 300 -o new "${URL}"
+ curl -Rz "./current" -m 300 ${CURL_OPTIONS} -o new "${URL}"
fi
# vim:set ft=sh:
diff --git a/update-openssh-known-hosts b/update-openssh-known-hosts
index 63df1e3..00d74a6 100755
--- a/update-openssh-known-hosts
+++ b/update-openssh-known-hosts
@@ -84,9 +84,13 @@ run-parts --list "${CONFDIR}/sources/" | while read sourcefile; do
if [ -e ${source}/current ]; then
cat ${source}/current >&3
fi
-done 3>| "${OUTFILE}.new"
+done 3>&1 | sort -u >| "${OUTFILE}.new"
-mv "${OUTFILE}.new" "${OUTFILE}"
+if cmp -s "${OUTFILE}" "${OUTFILE}.new"; then
+ rm "${OUTFILE}.new"
+else
+ mv "${OUTFILE}.new" "${OUTFILE}"
+fi
# clean up cache dirs of vanished sources
for d in *; do