X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=openssh-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=4a877449b788224c79e74d946dd4653f4851089d;hp=1e68c7e6231c9ebbc8069c855ee0779f01a662e7;hb=0e51036b0e700e1767ac092c0cb615e25f82f529;hpb=b599e7d68062d3f2e9456c0c9f0a8ac951658b81 diff --git a/debian/postinst b/debian/postinst index 1e68c7e..4a87744 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,18 +1,23 @@ #!/bin/sh set -e + [ "$1" = "configure" ] || exit 0 +[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx + +# Load CARNet Tools . /usr/share/carnet-tools/functions.sh + if [ -f /etc/ssh/sshd_config ]; then - check_and_sed '^PermitRootLogin yes' \ - 's/PermitRootLogin yes/PermitRootLogin no/g' \ - /etc/ssh/sshd_config || true + cp_check_and_sed '^PermitRootLogin yes' \ + 's/PermitRootLogin yes/PermitRootLogin no/g' \ + /etc/ssh/sshd_config || true - check_and_sed '^ReverseMappingCheck' \ - 's/^ReverseMappingCheck/#ReverseMappingCheck/g' \ - /etc/ssh/sshd_config || true + cp_check_and_sed '^ReverseMappingCheck' \ + 's/^ReverseMappingCheck/#ReverseMappingCheck/g' \ + /etc/ssh/sshd_config || true fi # restart @@ -21,3 +26,5 @@ if [ -x /usr/sbin/invoke-rc.d ]; then else [ -x /etc/init.d/ssh ] && /etc/init.d/ssh restart fi + +#DEBHELPER#