Subject: pkg/17409: fressh can't work from scripts
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wojtek@tensor.3miasto.net>
List: netbsd-bugs
Date: 06/27/2002 04:36:41
>Number:         17409
>Category:       pkg
>Synopsis:       fressh can't work from scripts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 27 04:37:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     WOjciech Puchar
>Release:        1.6BETA2
>Organization:
TENSOR ap
>Environment:
NetBSD chylonia.3miasto.net 1.6_BETA2 NetBSD 1.6_BETA2 (local) #3: Tue Jun 25 13:12:51 CEST 2002     wojtek@chylonia.3miasto.net:/home/wojtek/kernel/local i386

>Description:
fressh exits with error if TERM variable doesn't exist. it's quite common
in cron started scripts etc.
>How-To-Repeat:

>Fix:
Please add it to package patches:

it uses terminal type "dump" if nothing is set


--- ssh_main.c  Sun Feb 11 04:35:12 2001
+++ /tmp/ssh_main.c     Thu Jun 27 13:35:47 2002
@@ -150,6 +150,8 @@
        context->client->RemoteCommand = NULL;
 }
 
+char dumbterm[]="dumb";
+
 int
 ssh_setup(ssh_context_t * context)
 {
@@ -190,10 +192,8 @@
        context->username = NULL;       /* will be remote user's name */
 
        context->usepty = 0;
-       if ((context->term = getenv("TERM")) == NULL) {
-               SSH_ERROR("cannot determine local terminal type\n");
-               exit(1);
-       }
+       if ((context->term = getenv("TERM")) == NULL) 
+               context->term=dumbterm;
        context->modes = NULL;
        context->msize = 0;



and another patch so make install strips installed binaries. they are 4 times smaller then
--- Makefile~   Thu Jun 27 13:17:00 2002
+++ Makefile    Thu Jun 27 13:27:53 2002
@@ -43,7 +43,7 @@
 LIBS+= -lutil -lcrypt -lz ${IDEA_LIB} -lcrypto ${MEMDEBUG_LINK}
 
 INSTALL=install
-INSTALL_FLAGS=-c -r -m 755 -o bin -g bin
+INSTALL_FLAGS=-s -c -r -m 755 -o bin -g bin
 FRE=fre
 
 HDRS = options.h ssh_buffer.h ssh_channel.h ssh_client.h ssh_defines.h \


>Release-Note:
>Audit-Trail:
>Unformatted: