summaryrefslogtreecommitdiff
path: root/contrib/cygwin
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2008-02-23 14:47:37 -0800
committerTim Rice <tim@multitalents.net>2008-02-23 14:47:37 -0800
commit401a27a30718d7b2953e4a64ab9fc6c9d13e37b1 (patch)
tree02423de90e4438012a970766f9c92515365b647b /contrib/cygwin
parent54e3773ccb55500087fc722c79869679700dc318 (diff)
downloadopenssh-git-401a27a30718d7b2953e4a64ab9fc6c9d13e37b1.tar.gz
[contrib/cygwin/ssh-host-config]
Grammar changes on SYSCONFDIR LOCALSTATEDIR messages. Check more thoroughly that it's possible to create the /var/empty directory. Patch by vinschen AT redhat.com
Diffstat (limited to 'contrib/cygwin')
-rw-r--r--contrib/cygwin/ssh-host-config24
1 files changed, 18 insertions, 6 deletions
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
index e2ad69f1..f90af8d2 100644
--- a/contrib/cygwin/ssh-host-config
+++ b/contrib/cygwin/ssh-host-config
@@ -131,7 +131,7 @@ fi
if [ -e "${SYSCONFDIR}" -a ! -d "${SYSCONFDIR}" ]
then
echo
- echo "${SYSCONFDIR} is existant but not a directory."
+ echo "${SYSCONFDIR} exists but is not a directory."
echo "Cannot create global configuration files."
echo
exit 1
@@ -156,7 +156,7 @@ fi
if [ -e ${LOCALSTATEDIR}/log -a ! -d ${LOCALSTATEDIR}/log ]
then
echo
- echo "${LOCALSTATEDIR}/log is existant but not a directory."
+ echo "${LOCALSTATEDIR}/log exists but is not a directory."
echo "Cannot create ssh host configuration."
echo
exit 1
@@ -181,11 +181,23 @@ then
fi
# Create /var/empty file used as chroot jail for privilege separation
-if [ -f ${LOCALSTATEDIR}/empty ]
+if [ -e ${LOCALSTATEDIR}/empty -a ! -d ${LOCALSTATEDIR}/empty ]
then
- echo "Creating ${LOCALSTATEDIR}/empty failed!"
-else
- mkdir -p ${LOCALSTATEDIR}/empty
+ echo
+ echo "${LOCALSTATEDIR}/empty exists but is not a directory."
+ echo "Cannot create ssh host configuration."
+ echo
+ exit 1
+if [ ! -e ${LOCALSTATEDIR}/empty ]
+then
+ if ! mkdir -p ${LOCALSTATEDIR}/empty
+ then
+ echo
+ echo "Creating ${LOCALSTATEDIR}/empty directory failed."
+ echo "Cannot create ssh host configuration."
+ echo
+ exit 1
+ fi
if [ ${_nt} -gt 0 ]
then
chmod 755 ${LOCALSTATEDIR}/empty