#!/bin/bash
#
# __copy1__
# __copy2__
#
CMD=`basename $0`
set -u

[ $# != 1 ] && {
	echo "usage: $CMD key" >&2
	exit 1
}
[ `id -u` != 0 ] && {
	echo "$CMD: this command can be used only by root" >&2
	exit 1
}

ans=`echo "get $1" | debconf-communicate`
case $ans in
  0*)	echo -n "$ans" | sed -e 's/^0 //'
 	exit 0
	;;
  *)	echo "error: $ans" >&2
 	exit 1
	;;
esac
