소스 검색

Merge pull request #2742 from htgoebel/patch-2

Vagrantfile: Fix set-up of cygwin and its sshd.
TW 8 년 전
부모
커밋
f3fc546c9d
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      Vagrantfile

+ 6 - 4
Vagrantfile

@@ -200,24 +200,26 @@ def packages_cygwin(version)
     cd /d C:\\cygwin\\CygWin\\bin
     regtool set /HKLM/SYSTEM/CurrentControlSet/Services/OpenSSHd/ImagePath "C:\\cygwin\\CygWin\\bin\\cygrunsrv.exe"
     bash -c "ssh-host-config --no"
+    bash -c "chown sshd_server /cygdrive/c/cygwin/CygWin/var/empty"
     ' > /cygdrive/c/cygwin/install.bat
-    cd /cygdrive/c/cygwin && cmd.exe /c install.bat
 
     echo "alias mkdir='mkdir -p'" > ~/.profile
     echo "export CYGWIN_ROOT=/cygdrive/c/cygwin/CygWin" >> ~/.profile
-    echo 'export PATH=$PATH:$CYGWIN_ROOT/bin' >> ~/.profile
+    echo 'export PATH=$CYGWIN_ROOT/bin:$PATH' >> ~/.profile
 
     echo '' > ~/.bash_profile
 
-    cmd.exe /c 'setx /m PATH "%PATH%;C:\\cygwin\\CygWin\\bin"'
+    cmd.exe /c 'setx /m PATH "C:\\cygwin\\CygWin\\bin;%PATH%"'
     source ~/.profile
+    cd /cygdrive/c/cygwin && cmd.exe /c install.bat
+
     echo 'db_home: windows' > $CYGWIN_ROOT/etc/nsswitch.conf
   EOF
 end
 
 def install_cygwin_venv
   return <<-EOF
-      easy_install-3.4 pip
+      python3 -m ensurepip -U --default-pip
       pip install virtualenv
   EOF
 end