35 lines
564 B
Bash
Executable file
35 lines
564 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
case "${1}" in
|
|
configure)
|
|
db_get open-infrastructure-openssh-tools/ssh-authorizedkeys-command
|
|
SSH_AUTHORIZEDKEYS_COMMAND="${RET:-exit 0}" # string (w/ empty)
|
|
|
|
db_stop
|
|
|
|
cat /usr/share/openssh-tools/bin/ssh-pubkey.in > /usr/bin/ssh-pubkey
|
|
|
|
cat >> /usr/bin/ssh-pubkey << EOF
|
|
${SSH_AUTHORIZEDKEYS_COMMAND}
|
|
EOF
|
|
|
|
chmod 0755 /usr/bin/ssh-pubkey
|
|
;;
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`${1}'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|