diff --git a/etc/postinstall b/etc/postinstall index dc61a4d7014d..a4150d6db9e6 100755 --- a/etc/postinstall +++ b/etc/postinstall @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.13 2002/05/14 22:41:36 thorpej Exp $ +# $NetBSD: postinstall,v 1.14 2002/05/14 23:35:35 itojun Exp $ # # Copyright (c) 2002 The NetBSD Foundation, Inc. # All rights reserved. @@ -379,6 +379,11 @@ do_ssh() fi fi + if [ ! -d /var/empty ]; then + msg "/var/empty has to be present." + failed=1 + fi + if rcconf_isset sshd sshd_conf_dir ; then failed=1 fi @@ -424,6 +429,7 @@ do_uid() _named=0 _ntpd=0 + _sshd=0 while read _name _junk; do if [ "$_name" = "named" ]; then _named=1 @@ -431,6 +437,9 @@ do_uid() if [ "$_name" = "ntpd" ]; then _ntpd=1 fi + if [ "$_name" = "sshd" ]; then + _sshd=1 + fi done < ${DEST_DIR}/etc/passwd if [ "$_named" = "0" ]; then @@ -441,6 +450,10 @@ do_uid() msg "Required UID ntpd is not found." failed=1 fi + if [ "$_sshd" = "0" ]; then + msg "Required UID sshd is not found." + failed=1 + fi IFS="$_oIFS" return ${failed} @@ -461,6 +474,7 @@ do_gid() _named=0 _ntpd=0 + _sshd=0 while read _name _junk; do if [ "$_name" = "named" ]; then _named=1 @@ -468,6 +482,9 @@ do_gid() if [ "$_name" = "ntpd" ]; then _ntpd=1 fi + if [ "$_name" = "sshd" ]; then + _sshd=1 + fi done < ${DEST_DIR}/etc/group if [ "$_named" = "0" ]; then @@ -478,6 +495,10 @@ do_gid() msg "Required GID ntpd is not found." failed=1 fi + if [ "$_sshd" = "0" ]; then + msg "Required GID sshd is not found." + failed=1 + fi IFS="$_oIFS" return ${failed}