From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Feb 3 21:00:15 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CD6616A420 for ; Fri, 3 Feb 2006 21:00:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74D043D46 for ; Fri, 3 Feb 2006 21:00:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k13L0EYR061101 for ; Fri, 3 Feb 2006 21:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k13L0EZ5061100; Fri, 3 Feb 2006 21:00:14 GMT (envelope-from gnats) Resent-Date: Fri, 3 Feb 2006 21:00:14 GMT Resent-Message-Id: <200602032100.k13L0EZ5061100@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, mato Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9DFF16A420 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/92779: nxsetup fails if sshd(8) is not already running X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 21:00:15 -0000 >Number: 92779 >Category: ports >Synopsis: nxsetup fails if sshd(8) is not already running >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 03 21:00:13 GMT 2006 >Closed-Date: >Last-Modified: >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: >Unformatted: