misheska / basebox-packer

Packer templates for vagrant baseboxes
286 stars 80 forks source link

Fixes #33: start ssh daemon last #37

Closed rasa closed 10 years ago

rasa commented 10 years ago

Start ssh daemon after all other scripts are run, to avoid premature shutdown (floppy/zz-net-start-sshd.cmd)

misheska commented 10 years ago

Slight mod to your batch file to shrink it down to 2 lines: sc query sshd >nul 2>nul && set SSH_SERVICE=sshd sc query opensshd >nul 2>nul && set SSH_SERVICE=opensshd

In batch files, you can use && and || as one-liner with success/failure checking (I think) && (success action) || (failure action)

Trying this out to see if it works

rasa commented 10 years ago

Yeah, I agree, that's more elegant.

misheska commented 10 years ago

Merged