boot2docker / osx-installer

Docker installer for Mac OS X
Apache License 2.0
1.25k stars 258 forks source link

installer and uninstaller need to remove boot2docker.sh #76

Closed SvenDowideit closed 7 years ago

SvenDowideit commented 9 years ago

see https://github.com/boot2docker/boot2docker/issues/427#issuecomment-59142185

users that have been with us for a very long time

I'm not sure the safest way, but searching the PATH (and user HOME) and looking for a boot2docker.sh, and asking the user if we should move it aside might work.

logicminds commented 9 years ago

the old boot2docker script was in /usr/bin/boot2docker the new file is in /usr/local/bin/boot2docker

also:

should be easy to determine if they are using the old script by using the file command or the fact that the boot2docker binary is now in a different location.

Coreys-MacBook-Pro-2:~$file testscript testscript: a bash script text executable Coreys-MacBook-Pro-2:~$ which boot2docker /usr/local/bin/boot2docker Coreys-MacBook-Pro-2:~$ file /usr/local/bin/boot2docker /usr/local/bin/boot2docker: Mach-O 64-bit executable x86_64

SvenDowideit commented 9 years ago

y, but how do you detect if the script was a totally different, hand coded script that the user wrote - especially when we released many different versions of the original boot2docker.sh

just because its a script doesn't mean its ours

logicminds commented 9 years ago

I would prompt the user to ask if you can delete the file. Maybe detail the issue in the prompt.

tianon commented 9 years ago

We could accomplish this by collecting the md5sum of several (all?) the old released script versions and only remove if the file we find matches one, as one possible solution that's also reasonably simple and won't tread on user-customized stuff.