From 410343d6990d1d03b2fc1c9d8172030a0e4a7258 Mon Sep 17 00:00:00 2001 Message-Id: <410343d6990d1d03b2fc1c9d8172030a0e4a7258.1715007422.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 15 Feb 2012 00:42:07 +0000 Subject: [PATCH] keys.archive -> cryptop.archive: Command was in the wrong suite. Organization: Straylight/Edgeware From: Mark Wooding It uses user keys, and the archives are public. It doesn't make sense to restrict it to administrators only. Also, it wrote its output to the wrong place. Since the output is in two pieces, this is fiddly: use a tarball. --- Makefile.am | 2 +- keys.archive => cryptop.archive | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) rename keys.archive => cryptop.archive (72%) diff --git a/Makefile.am b/Makefile.am index e169f41..eb8e46f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,7 +101,6 @@ keyfunc.sh: keyfunc.sh.in Makefile mv keyfunc.sh.new keyfunc.sh ## Commands. -dist_pkglib_SCRIPTS += keys.archive dist_pkglib_SCRIPTS += keys.conceal dist_pkglib_SCRIPTS += keys.keeper-cards dist_pkglib_SCRIPTS += keys.keeper-nub @@ -132,6 +131,7 @@ dist_pkglib_DATA += ktype.seccure dist_profile_DATA += profile.d/01seccure ## Commands. +dist_pkglib_SCRIPTS += cryptop.archive dist_pkglib_SCRIPTS += cryptop.genkey dist_pkglib_SCRIPTS += cryptop.list dist_pkglib_SCRIPTS += cryptop.delkey diff --git a/keys.archive b/cryptop.archive similarity index 72% rename from keys.archive rename to cryptop.archive index 3ac414e..40bc5a7 100755 --- a/keys.archive +++ b/cryptop.archive @@ -28,30 +28,31 @@ case "${KEYSLIB+t}" in t) ;; *) echo >&2 "$0: KEYSLIB unset"; exit 1 ;; esac . "$KEYSLIB"/keyfunc.sh defhelp <$label.tar.gz.new -c_sign $kdir $knub <$label.tar.gz.new >$label.sig.new -for i in sig tar.gz; do mv $label.$i.new $label.$i; done +cd $tmp +mkdir $arch +ln -s $ETC $arch/config +mkdir $arch/data +ln -s $KEYS/* $arch/data/ +rm -f $arch/data/nub +tar cf - $arch/config/* $arch/data/*/* | gzip -9c >$arch.tar.gz +c_sign $kdir $knub <$arch.tar.gz >$arch.sig +tar cf - $arch.tar.gz $arch.sig ###----- That's all, folks -------------------------------------------------- -- [mdw]