Subject: misc/3430: /etc/rc never reports the existance of /var/tmp/vi.recover/*
To: None <gnats-bugs@gnats.netbsd.org>
From: NAKAJIMA Yoshihiro <nakayosh@kcn.or.jp>
List: netbsd-bugs
Date: 04/01/1997 23:14:27
>Number:         3430
>Category:       misc
>Synopsis:       /etc/rc never reports the existance of /var/tmp/vi.recover/*
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr  1 06:20:02 1997
>Last-Modified:
>Originator:     NAKAJIMA Yoshihiro
>Organization:
>Release:        NetBSD-current 1997/03/28
>Environment:
System: NetBSD asura 1.2D NetBSD 1.2D (ASURA) #1: Tue Apr  1 21:05:50 JST 1997 nakayosh@asura:/usr/src/sys/arch/i386/compile/ASURA i386


>Description:
	/etc/rc never reports the existance of /var/tmp/vi.recover/*

>How-To-Repeat:
	the folloing `test-recover.sh' is stolen from /etc/rc

% cat test-recover.sh
virecovery=/var/tmp/vi.recover/recover.*
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
	echo preserving editor files
	for i in $virecovery; do
#		sendmail -t < $i
		echo $i
	done
fi
% touch /var/tmp/vi.recover/recover.TEST
% sh test-recover.sh

>Fix:
	I don't know the right way,
	but the following code looks to operate well.

*** etc/rc.orig	Mon Mar 17 21:12:47 1997
--- etc/rc	Tue Apr  1 21:37:35 1997
***************
*** 235,241 ****
  	'password file may be incorrect -- /etc/ptmp exists'
  fi
  
! virecovery=/var/tmp/vi.recover/recover.*
  if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
  	echo preserving editor files
  	for i in $virecovery; do
--- 235,241 ----
  	'password file may be incorrect -- /etc/ptmp exists'
  fi
  
! virecovery=`echo /var/tmp/vi.recover/recover.*`
  if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
  	echo preserving editor files
  	for i in $virecovery; do
>Audit-Trail:
>Unformatted: