| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| References: | <loom DOT 20080904T183156-413 AT post DOT gmane DOT org> <48C0316C DOT F9E434A9 AT dessent DOT net> <00fc01c90f39$f4006970$9601a8c0 AT CAM DOT ARTIMI DOT COM> <loom DOT 20080910T172329-77 AT post DOT gmane DOT org> <007101c9136b$a62b3e10$9601a8c0 AT CAM DOT ARTIMI DOT COM> <loom DOT 20080910T174541-80 AT post DOT gmane DOT org> |
| Subject: | RE: setup.exe --quiet-mode |
| Date: | Wed, 10 Sep 2008 19:21:57 +0100 |
| Message-ID: | <007c01c91372$1c48c3a0$9601a8c0@CAM.ARTIMI.COM> |
| MIME-Version: | 1.0 |
| X-Mailer: | Microsoft Office Outlook 11 |
| In-Reply-To: | <loom.20080910T174541-80@post.gmane.org> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Rob wrote on 10 September 2008 19:03:
> I think the safest bet for me in this case is to just kill off everything
> and run setup.
It's really for the best. Upgrading Cygwin while *anything* is still
running is basically something we don't support, and the replace-on-reboot
option is really just a crude catchall for those inevitable times when people
do forget to shut everything down (it's usually services) in a
try-and-keep-it-limping-along-until-it-can-be-fixed sort of way; but as you've
seen, there are big (postinstall-script-sized) loopholes in it.
> Since I'll be doing this upgrade on close to 100 boxes,
> I've been trying to devise a *relatively* unattended process.
> In case it helps anyone in the future, here's a snippet of my cmd script
> I have so far:
>
> echo off
> echo This will kill all cygwin related processes and update cygwin
> echo Hit CTRL-C now to abort, otherwise:
> pause
> c:\cygwin\bin\bash.exe --login -c "ps -la|sed 's/^I/ /'|awk '{print
> $4}'|grep - v WINPID >/tmp/pids.txt"
> for /F %i in (c:\cygwin\tmp\pids.txt) DO taskkill /PID %i /F
> del /F c:\cygwin\tmp\pids.txt
> echo running setup...
> \\fileserver\cygwin\setup-2.602.exe -q -L -l \\fileserver\cygwin -R
> C:\cygwin echo Done
That seems like a good start, but it's perhaps just a little bit crude in
the way it handles services; if you kill them stone dead like that, the SCM
will try and restart any that are set for auto-restart-on-fail. It would
probably be a minor improvement if you add an extra bit of bash to shut them
down gracefully by invoking cygrunsrv on them, something a bit like ...
c:\cygwin\bin\bash.exe --login -c "cygrunsrv -L | xargs -n 1 cygrunsrv -E"
... and only then carry on to brute-force kill the leftovers.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |