From e1986e0a059d10f87c15fd0d9fee25bbedbb5cb6 Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 29 Jan 2009 20:30:01 +0000 Subject: [PATCH] - (tim) [contrib/cygwin/ssh-host-config] Patch from Corinna Vinschen. If the CYGWIN environment variable is empty, the installer script should not install the service with an empty CYGWIN variable, but rather without setting CYGWNI entirely. --- ChangeLog | 6 ++++++ contrib/cygwin/ssh-host-config | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8679e176..1d815a23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +20090129 + - (tim) [contrib/cygwin/ssh-host-config] Patch from Corinna Vinschen. + If the CYGWIN environment variable is empty, the installer script + should not install the service with an empty CYGWIN variable, but + rather without setting CYGWNI entirely. + 20090128 - (tim) [contrib/cygwin/ssh-host-config] Patch from Corinna Vinschen. Changes to work on Cygwin 1.5.x as well as on the new Cygwin 1.7.x. diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config index d4f5f32d..ec03f163 100644 --- a/contrib/cygwin/ssh-host-config +++ b/contrib/cygwin/ssh-host-config @@ -314,10 +314,14 @@ install_service() { csih_check_user "${run_service_as}" + if [ -n "${csih_cygenv}" ] + then + cygwin_env="-e CYGWIN=\"${csih_cygenv}\"" + fi if [ -z "${password}" ] then - if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a "-D" -y tcpip \ - -e CYGWIN="${csih_cygenv}" + if eval cygrunsrv -I sshd -d \"CYGWIN sshd\" -p /usr/sbin/sshd \ + -a "-D" -y tcpip ${cygwin_env} then echo csih_inform "The sshd service has been installed under the LocalSystem" @@ -326,8 +330,9 @@ install_service() { csih_inform "will start automatically after the next reboot." fi else - if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a "-D" -y tcpip \ - -e CYGWIN="${csih_cygenv}" -u "${run_service_as}" -w "${password}" + if eval cygrunsrv -I sshd -d \"CYGWIN sshd\" -p /usr/sbin/sshd \ + -a "-D" -y tcpip ${cygwin_env} \ + -u "${run_service_as}" -w "${password}" then echo csih_inform "The sshd service has been installed under the '${run_service_as}'" -- 2.45.2