summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-09-01 18:26:52 +0000
committerColin Watson <cjwatson@debian.org>2003-09-01 18:26:52 +0000
commit7eff9df1678223e1a3427ba621f6c379386f9cce (patch)
tree2cb5d53b6db2efbc92ae3757c1c1145b60c063e1 /debian/postinst
parent0bb3622af79c6402a15e88ce1290cbc776392403 (diff)
Debian release 3.5p1-4.
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst34
1 files changed, 20 insertions, 14 deletions
diff --git a/debian/postinst b/debian/postinst
index bd9ebd3aa..4d3598a31 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -37,7 +37,7 @@ create_key() {
37 37
38 if [ ! -f "$file" ] ; then 38 if [ ! -f "$file" ] ; then
39 echo -n $msg 39 echo -n $msg
40 ssh-keygen -f "$file" -N '' "$@" > /dev/null 40 ssh-keygen -q -f "$file" -N '' "$@"
41 echo 41 echo
42 fi 42 fi
43} 43}
@@ -50,11 +50,14 @@ create_keys() {
50 } 50 }
51 51
52 if [ "$RET" = "false" ] ; then 52 if [ "$RET" = "false" ] ; then
53 create_key "Creating SSH1 key" /etc/ssh/ssh_host_key -t rsa1 53 create_key "Creating SSH1 key; this may take some time ..." \
54 /etc/ssh/ssh_host_key -t rsa1
54 fi 55 fi
55 56
56 create_key "Creating SSH2 RSA key" /etc/ssh/ssh_host_rsa_key -t rsa 57 create_key "Creating SSH2 RSA key; this may take some time ..." \
57 create_key "Creating SSH2 DSA key" /etc/ssh/ssh_host_dsa_key -t dsa 58 /etc/ssh/ssh_host_rsa_key -t rsa
59 create_key "Creating SSH2 DSA key; this may take some time ..." \
60 /etc/ssh/ssh_host_dsa_key -t dsa
58} 61}
59 62
60 63
@@ -182,7 +185,7 @@ PasswordAuthentication yes
182X11Forwarding no 185X11Forwarding no
183X11DisplayOffset 10 186X11DisplayOffset 10
184PrintMotd no 187PrintMotd no
185#PrintLastLog no 188PrintLastLog yes
186KeepAlive yes 189KeepAlive yes
187#UseLogin no 190#UseLogin no
188 191
@@ -219,7 +222,7 @@ fix_rsh_diversion() {
219fix_statoverride() { 222fix_statoverride() {
220# Remove an erronous override for sshd (we should have overridden ssh) 223# Remove an erronous override for sshd (we should have overridden ssh)
221 if [ -x /usr/sbin/dpkg-statoverride ]; then 224 if [ -x /usr/sbin/dpkg-statoverride ]; then
222 if dpkg-statoverride --list /usr/sbin/sshd 2>/dev/null ; then 225 if dpkg-statoverride --list /usr/sbin/sshd >/dev/null ; then
223 dpkg-statoverride --remove /usr/sbin/sshd 226 dpkg-statoverride --remove /usr/sbin/sshd
224 fi 227 fi
225 fi 228 fi
@@ -227,17 +230,20 @@ fix_statoverride() {
227 230
228 231
229create_alternatives() { 232create_alternatives() {
230# Create alternatives for the various r* tools 233# Create alternatives for the various r* tools.
231# Make sure we don't change existing alternatives that a user might have 234# Make sure we don't change existing alternatives that a user might have
232# changed 235# changed, but clean up after some old alternatives that mistakenly pointed
233 for cmd in rsh rlogin rcp ; do 236# rlogin and rcp to ssh.
234 if ! update-alternatives --display $cmd | \ 237 update-alternatives --quiet --remove rlogin /usr/bin/ssh
235 grep -q ssh ; then 238 update-alternatives --quiet --remove rcp /usr/bin/ssh
236 update-alternatives --quiet --install /usr/bin/$cmd $cmd /usr/bin/ssh 20 \ 239 for cmd in rsh rlogin rcp; do
237 --slave /usr/share/man/man1/$cmd.1.gz $cmd.1.gz /usr/share/man/man1/ssh.1.gz 240 scmd="s${cmd#r}"
241 if ! update-alternatives --display "$cmd" | \
242 grep -q "$scmd"; then
243 update-alternatives --quiet --install "/usr/bin/$cmd" "$cmd" "/usr/bin/$scmd" 20 \
244 --slave "/usr/share/man/man1/$cmd.1.gz" "$cmd.1.gz" "/usr/share/man/man1/$scmd.1.gz"
238 fi 245 fi
239 done 246 done
240
241} 247}
242 248
243setup_sshd_user() { 249setup_sshd_user() {