Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bob Tanner
packer-windows
Commits
dbb3e8f1
Commit
dbb3e8f1
authored
Mar 25, 2014
by
ranl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix passing exit status from shell provisioner to packer
parent
1489e569
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
scripts/openssh.ps1
scripts/openssh.ps1
+6
-1
No files found.
scripts/openssh.ps1
View file @
dbb3e8f1
...
...
@@ -32,6 +32,11 @@ Write-Host "Setting SSH home directories"
Foreach-Object
{
$_
-replace
'/home/(\w+)'
,
'/cygdrive/c/Users/$1'
}
|
Set-Content
'C:\Program Files\OpenSSH\etc\passwd'
# Set shell to /bin/sh to return exit status
$passwd_file
=
Get-Content
'C:\Program Files\OpenSSH\etc\passwd'
$passwd_file
=
$passwd_file
-replace
'/bin/bash'
,
'/bin/sh'
Set-Content
'C:\Program Files\OpenSSH\etc\passwd'
$passwd_file
# fix opensshd to not be strict
Write-Host
"Setting OpenSSH to be non-strict"
$sshd_config
=
Get-Content
"C:\Program Files\OpenSSH\etc\sshd_config"
...
...
@@ -74,4 +79,4 @@ netsh advfirewall firewall add rule name="ssh" dir=in action=allow protocol=TCP
if
(
$AutoStart
-eq
$true
)
{
Start-Service
"OpenSSHd"
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment