summaryrefslogtreecommitdiffstats
path: root/contrib/cygwin/ssh-host-config
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2009-01-29 21:30:01 +0100
committerTim Rice <tim@multitalents.net>2009-01-29 21:30:01 +0100
commit6a3253496843abf7b10d1aadb46847e8b11039ec (patch)
tree897536ee2635484c50b752834d298ed853e54d02 /contrib/cygwin/ssh-host-config
parent - (tim) [contrib/cygwin/ssh-host-config] Patch from Corinna Vinschen. (diff)
downloadopenssh-6a3253496843abf7b10d1aadb46847e8b11039ec.tar.xz
openssh-6a3253496843abf7b10d1aadb46847e8b11039ec.zip
- (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.
Diffstat (limited to '')
-rw-r--r--contrib/cygwin/ssh-host-config13
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
index d4f5f32d0..ec03f163d 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}'"