]> andersk Git - openssh.git/blobdiff - contrib/cygwin/ssh-host-config
- (tim) [contrib/cygwin/ssh-host-config] Patch from Corinna Vinschen.
[openssh.git] / contrib / cygwin / ssh-host-config
index d4f5f32d006e545506ffaea1ded772b5e17d1e74..ec03f163d6c8ece695e22a89eb9d07afbb9a3e5e 100644 (file)
@@ -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}'"
This page took 0.077219 seconds and 4 git commands to generate.