From nobody@FreeBSD.org  Fri Feb  3 20:55:48 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E9DFF16A420
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Feb 2006 20:55:48 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9080D43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Feb 2006 20:55:48 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k13Ktki0030013
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 3 Feb 2006 20:55:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k13KtkvH030011;
	Fri, 3 Feb 2006 20:55:46 GMT
	(envelope-from nobody)
Message-Id: <200602032055.k13KtkvH030011@www.freebsd.org>
Date: Fri, 3 Feb 2006 20:55:46 GMT
From: mato <gamato@pobox.sk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: nxsetup fails if sshd(8) is not already running
X-Send-Pr-Version: www-2.3

>Number:         92779
>Category:       ports
>Synopsis:       nxsetup fails if sshd(8) is not already running
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 03 21:00:13 GMT 2006
>Closed-Date:    Mon Mar 27 10:06:52 GMT 2006
>Last-Modified:  Mon Mar 27 10:06:52 GMT 2006
>Originator:     mato
>Release:        FreeBSD 6.0-STABLE
>Organization:
>Environment:
FreeBSD mb-aw1n-bsd 6.0-STABLE FreeBSD 6.0-STABLE #1: Wed Feb  1 08:55:03 CET 2006     root@mb-aw1n-bsd:/usr/obj/usr/src/sys/MB-AW1N  i386
>Description:
it seems the port was only tried with sshd already running.
if it's not, the check on pid file fails and due to "set -e" the script is aborted.
also, sshd is run differently, not from init.d, on FreeBSD.
>How-To-Repeat:
try to setup/startup NX server without sshd(8) already running.
>Fix:
diff -ruN freenx/files/patch-freenx-nxsetup freenx.modified/files/patch-freenx-nxsetup
--- freenx/files/patch-freenx-nxsetup	Mon Sep 26 12:02:39 2005
+++ freenx.modified/files/patch-freenx-nxsetup	Fri Feb  3 21:18:38 2006
@@ -1,5 +1,5 @@
---- freenx-0.4.4/nxsetup.orig	Tue Aug  2 13:29:59 2005
-+++ freenx-0.4.4/nxsetup	Tue Aug  9 17:04:45 2005
+--- nxsetup.unported	Fri Feb  3 20:52:09 2006
++++ nxsetup	Fri Dec 30 18:29:50 2005
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/usr/local/bin/bash
@@ -32,18 +32,28 @@
  	# no, its a "normal" useradd
  	else
  		USERADD_OPTIONS="-d $NX_HOME_DIR -s $PATH_BIN/nxserver"
-@@ -143,7 +153,9 @@
+@@ -142,15 +152,16 @@
+ install_nx()
  {
  	set -e
- 	
+-	
 -	if [ "$(pidof sshd 2>/dev/null)" = "" ]
-+	MAYBE_PID=`cat /var/run/sshd.pid 2>/dev/null`
++
++	[ -f /var/run/sshd.pid ] && MAYBE_PID=`cat /var/run/sshd.pid 2>/dev/null`
 +	if test -z "$MAYBE_PID"
 +
  	then 
  		echo -n "Starting ssh service ..."
  		# Generate Host keys if they are not available, yet
-@@ -248,13 +260,12 @@
+ 		[ -e /etc/ssh/ssh_host_rsa_key ] || $COMMAND_SSH_KEYGEN -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N ''
+ 		[ -e /etc/ssh/ssh_host_dsa_key ] || $COMMAND_SSH_KEYGEN -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N ''
+-		[ -x /etc/init.d/sshd ] && /etc/init.d/sshd start
+-		[ -x /etc/init.d/ssh ] && /etc/init.d/ssh start
++		[ -x /etc/rc.d/sshd ] && /etc/rc.d/sshd forcestart
+ 		echo "done"
+ 	fi
+ 	
+@@ -248,13 +259,12 @@
  		cat /etc/ssh/ssh_host_rsa_key.pub >> $NX_HOME_DIR/.ssh/known_hosts
  	fi
  	
@@ -62,7 +72,7 @@
  	echo "done"
  }
  
-@@ -268,7 +279,7 @@
+@@ -268,7 +278,7 @@
  		then
  			luserdel nx
  		else
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Feb 3 21:18:43 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92779 

From: martinko <gamato@pobox.sk>
To: bug-followup@FreeBSD.org,  gamato@pobox.sk
Cc:  
Subject: Re: ports/92779: nxsetup fails if sshd(8) is not already running
Date: Fri, 03 Feb 2006 22:12:46 +0100

 hi,
 
 i'm sorry i forgot to mention it's for port net/freenx.
 
 m.

From: dewey hylton <freenx@deweyonline.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/92779: net/freenx - nxsetup fails if sshd(8) is not already running
Date: Mon,  6 Feb 2006 08:42:12 -0500

 Quoting Edwin Groothuis <edwin@FreeBSD.org>:
 
 > Maintainer of net/freenx,
 > 
 > Please note that PR ports/92779 has just been submitted.
 > 
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 > 
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/92779
 > 
 > -- 
 > Edwin Groothuis
 > edwin@FreeBSD.org
 > 
 
 
 looks decent enough, please "take care of it" before the freeze. thanks for your
 work! :)
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Mon Feb 6 19:27:01 UTC 2006 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92779 
Responsible-Changed-From-To: freebsd-ports-bugs->vd 
Responsible-Changed-By: vd 
Responsible-Changed-When: Mon Mar 27 08:16:55 UTC 2006 
Responsible-Changed-Why:  
I will take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92779 
State-Changed-From-To: open->closed 
State-Changed-By: vd 
State-Changed-When: Mon Mar 27 10:02:41 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92779 
>Unformatted:
