[PATCH/cygwin] Fix cygwin specific Makefile and a bug in the ssh-host-config script
Corinna Vinschen
vinschen at redhat.com
Tue Nov 11 00:20:18 EST 2008
On Nov 7 11:16, Bob Proulx wrote:
> Daniel Kahn Gillmor wrote:
> > ps -ef | grep -q '[s]shd'
> [...]
> if [ -n "$(ps -e | awk '$NF=="sshd"')" ]
>
> In summary to me using 'ps -e' seems more correct that using 'ps -ef'
> and then filtering out the -f part of the output.
The difference between ps -e and ps -ef is not the same on Cygwin as on
Linux. The command strings are identical (full path) so the above awk
expression doesn't work on Cygwin, besides the fact that it doesn't
catch ssh processes, only sshd.
The final expression which is now used is this:
if ps -ef | grep -q '/sshd\?$'
I pasted the entire patch again below. Could somebody please check it in?
Thanks,
Corinna
Index: contrib/cygwin/Makefile
===================================================================
RCS file: /cvs/openssh/contrib/cygwin/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- contrib/cygwin/Makefile 14 Jul 2008 02:12:54 -0000 1.3
+++ contrib/cygwin/Makefile 10 Nov 2008 13:11:53 -0000
@@ -38,11 +38,13 @@ install-sshdoc:
$(INSTALL) -m 644 $(srcdir)/ChangeLog $(DESTDIR)$(sshdocdir)/ChangeLog
$(INSTALL) -m 644 $(srcdir)/LICENCE $(DESTDIR)$(sshdocdir)/LICENCE
$(INSTALL) -m 644 $(srcdir)/OVERVIEW $(DESTDIR)$(sshdocdir)/OVERVIEW
+ $(INSTALL) -m 644 $(srcdir)/PROTOCOL $(DESTDIR)$(sshdocdir)/PROTOCOL
+ $(INSTALL) -m 644 $(srcdir)/PROTOCOL.agent $(DESTDIR)$(sshdocdir)/PROTOCOL.agent
$(INSTALL) -m 644 $(srcdir)/README $(DESTDIR)$(sshdocdir)/README
$(INSTALL) -m 644 $(srcdir)/README.dns $(DESTDIR)$(sshdocdir)/README.dns
+ $(INSTALL) -m 644 $(srcdir)/README.platform $(DESTDIR)$(sshdocdir)/README.platform
$(INSTALL) -m 644 $(srcdir)/README.privsep $(DESTDIR)$(sshdocdir)/README.privsep
$(INSTALL) -m 644 $(srcdir)/README.smartcard $(DESTDIR)$(sshdocdir)/README.smartcard
- $(INSTALL) -m 644 $(srcdir)/RFC.nroff $(DESTDIR)$(sshdocdir)/RFC.nroff
$(INSTALL) -m 644 $(srcdir)/TODO $(DESTDIR)$(sshdocdir)/TODO
$(INSTALL) -m 644 $(srcdir)/WARNING.RNG $(DESTDIR)$(sshdocdir)/WARNING.RNG
Index: contrib/cygwin/ssh-host-config
===================================================================
RCS file: /cvs/openssh/contrib/cygwin/ssh-host-config,v
retrieving revision 1.22
diff -u -p -r1.22 ssh-host-config
--- contrib/cygwin/ssh-host-config 14 Jul 2008 02:12:54 -0000 1.22
+++ contrib/cygwin/ssh-host-config 10 Nov 2008 13:11:53 -0000
@@ -456,7 +456,7 @@ done
# Check for running ssh/sshd processes first. Refuse to do anything while
# some ssh processes are still running
-if ps -ef | grep -v grep | grep -q ssh
+if ps -ef | grep -q '/sshd\?$'
then
echo
csih_error "There are still ssh processes running. Please shut them down first."
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the openssh-unix-dev
mailing list