This repository has been archived by the owner. It is now read-only.

Make start.sh start a shell instead of sshing VM #88

Merged
merged 1 commit into from Mar 24, 2015

Conversation

Projects
None yet
2 participants
@ahmetb
Contributor

ahmetb commented Mar 24, 2015

This change makes start.sh eval output of shellinit cmd and then start a
bash login shell (still can't find out a good way to override git's MOTD
without losing it, so no change there).

With this change clicking on "Boot2Docker Start" shortcut does the following:

(last cmd failing because we use b2d 1.5.0 iso)

Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com
cc: @tianon @SvenDowideit

start.sh Outdated
echo
PWD=$HOME /bin/bash --login -i # start a shell at home
echo
echo '[Press any key to exit]'

This comment has been minimized.

@ahmetb

ahmetb Mar 24, 2015

Contributor

not sure if we should keep this and read below... exiting from /bin/bash could just close the cmd.exe window @tianon ?

This comment has been minimized.

@tianon

tianon Mar 24, 2015

Contributor

Yeah, let's just remove these now. 👍

start.sh Outdated
echo
PWD=$HOME /bin/bash --login -i # start a shell at home

This comment has been minimized.

@tianon

tianon Mar 24, 2015

Contributor

Could this be something like this instead? (to be a little bit more defensive about paths)

cd
exec "$BASH" --login -i
start.sh Outdated
./boot2docker.exe ssh
echo 'setting environment variables ...'
./boot2docker.exe shellinit | sed 's,\\,\\\\,g' # eval swallows single backslashes in windows style path
eval $(./boot2docker.exe shellinit 2>/dev/null | sed 's,\\,\\\\,g')

This comment has been minimized.

@tianon

tianon Mar 24, 2015

Contributor

Shouldn't this be quoted? (and would that help with the \ problem?)

eval "$(./boot2docker.exe shellinit 2>/dev/null)"

This comment has been minimized.

@tianon

tianon Mar 24, 2015

Contributor

I feel like maybe this should be a fix in boot2docker-cli too (handling backslashes properly).

This comment has been minimized.

@ahmetb

ahmetb Mar 24, 2015

Contributor

@tianon yep in my list to fix it in the -cli but I'll add "s here

This comment has been minimized.

@ahmetb

ahmetb Mar 24, 2015

Contributor

yeah adding double quotes doesn't help \ problem

Make start.sh start a shell instead of sshing VM
This change makes start.sh eval output of shellinit cmd and then start a
bash login shell (still can't find out a good way to override git's MOTD
without losing it, so no change there).

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
@tianon

This comment has been minimized.

Contributor

tianon commented Mar 24, 2015

LGTM

tianon added a commit that referenced this pull request Mar 24, 2015

Merge pull request #88 from ahmetalpbalkan/start-script-fix
Make start.sh start a shell instead of sshing VM

@tianon tianon merged commit 5b28e88 into boot2docker:master Mar 24, 2015

@ahmetb ahmetb deleted the ahmetb:start-script-fix branch Mar 24, 2015

@ahmetb ahmetb referenced this pull request Mar 24, 2015

Closed

Proposal: Shipping Docker CLI for Windows #80

7 of 9 tasks complete
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.