Re: Multiple installations and 3PPs (FAQ alert)
On Sat, 22 Jan 2005 11:32:08 -0800, Joshua Daniel Franklin wrote: I like the idea of it at least saving mounts. And the paths should work (note the bin). :) The only thing I would change is to save the state of the mounts within the uninstall script (just before uninstalling), rather than the state at install time when /etc/postinstall/gen-uninst.sh was run. I also added a warning at the beginning, since this performs such a drastic operation, even though the UN*X philosophy is to do what the user says, no matter what, as in rm * .o: -- BEGIN gen-uninst.sh -- #!/bin/sh CYGDIR=`/bin/cygpath -aw /` cat /uninstall.bat EOF @echo Warning! This will remove all of Cygwin! @echo Use Ctrl-C or Ctrl-Break now to abort. Any other key will continue. @pause $CYGDIR\\bin\\mount -m %TEMP%\\saved-mounts.bat $CYGDIR\\bin\\umount -s -A $CYGDIR\\bin\\umount -A copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP% $CYGDIR\\bin\\rm -rf / del /s $CYGDIR %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe EOF --- END gen-uninst.sh --- Steve -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Multiple installations and 3PPs (FAQ alert)
On Sun, 23 Jan 2005, Steve Munson wrote: On Sat, 22 Jan 2005 11:32:08 -0800, Joshua Daniel Franklin wrote: I like the idea of it at least saving mounts. And the paths should work (note the bin). :) The only thing I would change is to save the state of the mounts within the uninstall script (just before uninstalling), rather than the state at install time when /etc/postinstall/gen-uninst.sh was run. I also added a warning at the beginning, since this performs such a drastic operation, even though the UN*X philosophy is to do what the user says, no matter what, as in rm * .o: -- BEGIN gen-uninst.sh -- #!/bin/sh CYGDIR=`/bin/cygpath -aw /` cat /uninstall.bat EOF @echo Warning! This will remove all of Cygwin! @echo Use Ctrl-C or Ctrl-Break now to abort. Any other key will continue. @pause $CYGDIR\\bin\\mount -m %TEMP%\\saved-mounts.bat $CYGDIR\\bin\\umount -s -A $CYGDIR\\bin\\umount -A copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP% $CYGDIR\\bin\\rm -rf / del /s $CYGDIR %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe EOF --- END gen-uninst.sh --- Ok, so now we have two new versions of this floating around: this and http://cygwin.com/ml/cygwin/2005-01/msg01092.html. The final solution will, hopefully, combine the best features of both (mostly the output messages/warnings, as they're the same otherwise, AFAICS). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Multiple installations and 3PPs (FAQ alert)
On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski [EMAIL PROTECTED] wrote: [] | Should we, perhaps, provide a small 'uninstall' script, maybe in | /usr/sbin, that would perform a umount and then use regtool to remove the | registry key? It could even be a .bat, which will enable it to delete all | of Cygwin once the last Cygwin process exits... A postinstall script | could generate it, too, so that it contains explicit paths of the Cygwin | root directory. Something like | | -- BEGIN gen-uninst.sh -- | #!/bin/sh | CYGDIR=`/bin/cygpath -aw /` | cat /usr/sbin/uninstall.bat EOF | $CYGDIR\\umount -s -A | $CYGDIR\\umount -A | copy $CYGDIR\\cygwin1.dll $CYGDIR\\regtool.exe %TEMP% | $CYGDIR\\rm -rf / | del /s $CYGDIR | %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions | %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions | del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe | EOF | --- END gen-uninst.sh --- Looks good to me. But perhaps an option to save the current mount points somewhere would be useful in case the purpose of the uininstall is not removal for it's own sake but removal in order to perform a clean install, with subsequent restoration of the mount points. In other words insert a mount -m command before the first umount. -- davidp / DavidPostill -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Multiple installations and 3PPs (FAQ alert)
On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski wrote: | Should we, perhaps, provide a small 'uninstall' script, maybe in | /usr/sbin, that would perform a umount and then use regtool to remove the | registry key? It could even be a .bat, which will enable it to delete all | of Cygwin once the last Cygwin process exits... A postinstall script | could generate it, too, so that it contains explicit paths of the Cygwin | root directory. I like the idea of it at least saving mounts. And the paths should work (note the bin). :) -- BEGIN gen-uninst.sh -- #!/bin/sh CYGDIR=`/bin/cygpath -aw /` mount -m /saved-mounts.sh cat /uninstall.bat EOF $CYGDIR\\bin\\umount -s -A $CYGDIR\\bin\\umount -A copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP% copy $CYGDIR\\saved-mounts.sh %TEMP% $CYGDIR\\bin\\rm -rf / del /s $CYGDIR %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe EOF -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Multiple installations and 3PPs (FAQ alert)
On Sat, 22 Jan 2005, Joshua Daniel Franklin wrote: On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski wrote: | Should we, perhaps, provide a small 'uninstall' script, maybe in | /usr/sbin, that would perform a umount and then use regtool to remove the | registry key? It could even be a .bat, which will enable it to delete all | of Cygwin once the last Cygwin process exits... A postinstall script | could generate it, too, so that it contains explicit paths of the Cygwin | root directory. I like the idea of it at least saving mounts. And the paths should work (note the bin). :) Whoops! Missed that. However, the mounts should be saved *inside* uninstall.bat, using a Windows path. :-) Also, since you're *uninstalling* Cygwin, the mounts should go into a .bat, not a .sh, with a more suggestive name... -- BEGIN gen-uninst.sh -- #!/bin/sh CYGDIR=`/bin/cygpath -aw /` cat /uninstall.bat EOF $CYGDIR\\bin\\mount -m %TEMP%\\restore-mounts.bat $CYGDIR\\bin\\umount -s -A $CYGDIR\\bin\\umount -A copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP% copy $CYGDIR\\saved-mounts.sh %TEMP% $CYGDIR\\bin\\rm -rf / del /s $CYGDIR %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe echo Cygwin is now un-installed. echo To restore the mounts later, run %TEMP%\\restore-mounts.bat EOF --- END gen-uninst.sh --- HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Multiple installations and 3PPs (FAQ alert)
On Fri, Jan 21, 2005 at 11:17:30PM -0500, Larry Hall wrote: Perhaps this was the reference Dick had in mind? How do I uninstall all of Cygwin? http://cygwin.com/faq/faq_toc.html#TOC20 Perhaps. Joshua, if you have a chance, could you add something about using mount to remove the options. Of course, this might be sort of a chicken/egg thing. You could do something like: mount --remove-all-mounts Then use My Computer to delete the cygwin directory. This would still leave an Cygnus Solutions key in the registry, though. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Multiple installations and 3PPs (FAQ alert)
On Fri, 21 Jan 2005, Christopher Faylor wrote: On Fri, Jan 21, 2005 at 11:17:30PM -0500, Larry Hall wrote: Perhaps this was the reference Dick had in mind? How do I uninstall all of Cygwin? http://cygwin.com/faq/faq_toc.html#TOC20 Perhaps. Joshua, if you have a chance, could you add something about using mount to remove the options. Of course, this might be sort of a chicken/egg thing. You could do something like: mount --remove-all-mounts Then use My Computer to delete the cygwin directory. This would still leave an Cygnus Solutions key in the registry, though. cgf Should we, perhaps, provide a small 'uninstall' script, maybe in /usr/sbin, that would perform a umount and then use regtool to remove the registry key? It could even be a .bat, which will enable it to delete all of Cygwin once the last Cygwin process exits... A postinstall script could generate it, too, so that it contains explicit paths of the Cygwin root directory. Something like -- BEGIN gen-uninst.sh -- #!/bin/sh CYGDIR=`/bin/cygpath -aw /` cat /usr/sbin/uninstall.bat EOF $CYGDIR\\umount -s -A $CYGDIR\\umount -A copy $CYGDIR\\cygwin1.dll $CYGDIR\\regtool.exe %TEMP% $CYGDIR\\rm -rf / del /s $CYGDIR %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe EOF --- END gen-uninst.sh --- (I don't recall whether the cygwin DLL will try to create the HKLM key or only the HKCU key if none are present). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/