Bug 78419

Summary: /etc/termcap is a symbolic link
Product: Base System Reporter: Eygene A. Ryabinkin <rea>
Component: confAssignee: Bruce Cran <brucec>
Status: Closed FIXED    
Severity: Affects Only Me CC: rik
Priority: Normal    
Version: 5.3-STABLE   
Hardware: Any   
OS: Any   

Description Eygene A. Ryabinkin 2005-03-04 16:30:14 UTC
On default installation of FreeBSD file /etc/termcap is a symlink to a
/usr/share/misc/termcap. It makes impossible the usage of ncurses- or
termcap-aware utilities in single-user mode without mounted /usr. The main
impact is the impossibility of using /stand/sysinstall without mounted /usr
in single-user mode. Sometimes it is impossible to mount /usr, e.g. in the case
of disk failure, either soft or hard.

Fix: 

Move termcap database to /etc, where it logically belongs, and make symlink
in /usr/share/misc.
How-To-Repeat: Boot in single-user and try running /stand/sysinstall without doing mount -a.
Comment 1 brooks 2005-03-04 18:39:37 UTC
Since we now delete /stand after installation on 6 and the real home of
sysinstall is /usr/sbin, I seriously doubt this will change.

-- Brooks
Comment 2 rik 2005-03-04 18:52:47 UTC
Brooks Davis wrote:

>Since we now delete /stand after installation on 6 and the real home of
>sysinstall is /usr/sbin, I seriously doubt this will change.
>  
>
The point was that not only sysinstall affected by this problem, but any 
application that
may use termcap. So we either should check all applications from /bin 
and /sbin if
they affected by that problem and fix them or do smth else.

I hope that sysinstall would be rewritten by some on before 6.release. But
for 5.stable this could be fixed. I've already discuss this problem 
(concerning
sysinstall) with ru@ and he suggested a patch. I asked Eygene to write a pr
specially to get more peoples involved to discussion of general problem.

However, I can't say at this moment if we have other affected application.

rik

>-- Brooks
>  
>
Comment 3 Eygene A. Ryabinkin 2005-03-05 07:26:38 UTC
> Brooks Davis wrote:
> 
> >Since we now delete /stand after installation on 6 and the real home of
> >sysinstall is /usr/sbin, I seriously doubt this will change.
 It is great for 6, but people will use 5 at least for a year. And this problem
sometimes is a real pain in the ass.
 About moving sysinstall to /usr/sbin: it is not a wise thing, as for me:
consider disk failure, when all you can mount is a root partition. I am
expecting sysinstall to be on this partition to use all fancy and easy-to-use
fdisk, newfs, package manager and other tools. After moving sysinstall to
/usr/sbin such behaviour is lost and one has to do the things by hand.
 Is there are any real reason to move sysinstall to /usr/sbin?

> Roman Kurakin wrote:
>
> The point was that not only sysinstall affected by this problem, but any 
> application that
> may use termcap. So we either should check all applications from /bin 
> and /sbin if
> they affected by that problem and fix them or do smth else.
 At 5.3-STABLE there are programs in /bin and /sbin that are using ncurses:
	/bin/csh
	/bin/ls
	/bin/sh
	/bin/tcsh
	/sbin/fsdb
	/sbin/gvinum
	/sbin/ipfstat
	/sbin/vinum
 I had not checked to what extent each program uses ncurses, but all of those
presumably using at least initscr() that, AFAIK, tries to read termcap/terminfo
database.
 Maybe you can explain to me, why termcap database is put to /usr/share/misc,
rather than to /etc: the /etc is the place for system-wide configuration files
and it is usually lives on root partition. So, if we can mount root we have
/etc and thus termcap and all other configuration files. I know many admins
who are making their /usr/local/etc a symlink to some directory in /etc, just
to have all configuration in one place: it is proven to be more
failure-resistant, just by everyday admin expirience of those people.
-- 
 rea
Comment 4 Bruce Cran freebsd_committer freebsd_triage 2010-03-07 10:58:44 UTC
State Changed
From-To: open->patched

With r204820 termcap.small is now installed into /etc and is used if 
/etc/termcap can't be opened. 


Comment 5 Bruce Cran freebsd_committer freebsd_triage 2010-03-07 10:58:44 UTC
Responsible Changed
From-To: freebsd-bugs->brucec

Track.
Comment 6 dfilter service freebsd_committer freebsd_triage 2010-04-20 19:46:10 UTC
Author: brucec
Date: Tue Apr 20 18:46:00 2010
New Revision: 206908
URL: http://svn.freebsd.org/changeset/base/206908

Log:
  MFC r204820:
  
  Install /etc/termcap.small .
  
  PR:	conf/78419
  Submitted by:	Eygene A.Ryabinkin <rea at mbslab.kiae.ru>
  Approved by:	rrs (mentor)

Modified:
  stable/8/etc/Makefile
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/Makefile
==============================================================================
--- stable/8/etc/Makefile	Tue Apr 20 18:44:23 2010	(r206907)
+++ stable/8/etc/Makefile	Tue Apr 20 18:46:00 2010	(r206908)
@@ -18,7 +18,7 @@ BIN1=	auth.conf \
 	rc rc.bsdextended rc.firewall rc.initdiskless \
 	rc.sendmail rc.shutdown \
 	rc.subr remote rpc services shells \
-	sysctl.conf syslog.conf \
+	sysctl.conf syslog.conf termcap.small \
 	etc.${MACHINE_ARCH}/ttys
 
 OPENBSMDIR=			${.CURDIR}/../contrib/openbsm
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 Bruce Cran freebsd_committer freebsd_triage 2010-04-20 20:46:43 UTC
State Changed
From-To: patched->closed

Fix has been committted to stable/8.