From nobody@FreeBSD.org  Sat Jan  6 20:32:14 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 985F237B400
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Jan 2001 20:32:14 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f074WEv01813;
	Sat, 6 Jan 2001 20:32:14 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200101070432.f074WEv01813@freefall.freebsd.org>
Date: Sat, 6 Jan 2001 20:32:14 -0800 (PST)
From: jay.krell@cornell.edu;, jaykrell@hotmail.com;
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: linprocfs setup/startup lost when port moved into system
X-Send-Pr-Version: www-1.0

>Number:         24121
>Category:       misc
>Synopsis:       linprocfs setup/startup lost when port moved into system
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 06 20:40:01 PST 2001
>Closed-Date:    Sat May 26 10:09:14 PDT 2001
>Last-Modified:  Sat May 26 10:09:51 PDT 2001
>Originator:     Jay Krell
>Release:        4.2
>Organization:
Jay Krell
>Environment:
$ uname -a
FreeBSD jaykfbsd.jaykhome 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:5
5 GMT 2000     jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386
$
>Description:
The Linux compatibility stuff never seems to load linprocfs and mount it. It appears linprocfs used to be a port, and was merged into FreeBSD itself. The port had some simple install stuff in its Makefile:

LINUX_DIR=	/compat/linux

CATEGORIES=	emulators
MAINTAINER=	vns@delta.odessa.ua

DISTNAME=       linprocfs
MASTER_SITES=	http://www.enst.fr/~beyssac/freebsd/

WRKSRC=		${WRKDIR}/sys/modules/linprocfs
MAKE_ARGS=	"KMODDIR=${PREFIX}/modules"

STARTUP=	${PREFIX}/etc/rc.d/linprocfs.sh 

pre-install: 
	[ -d ${PREFIX}/modules ] || mkdir -p ${PREFIX}/modules 
	${LN} -s /sbin/mount_std ${PREFIX}/sbin/mount_linprocfs
	${ECHO} "Installing ${PREFIX}/etc/rc.d/linprocfs.sh startup file.";
	${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/linprocfs.sh; 
	${ECHO} "[ -x ${PREFIX}/sbin/mount_linprocfs ] && kldload ${PREFIX}/modules/linprocfs.ko && ${PREFIX}/sbin/mount_linprocfs linprocfs ${LINUX_DIR}/proc && ${ECHO_MSG} -n ' linprocfs'" >> ${STARTUP}
	${CHMOD} ${BINMODE} ${STARTUP}
	${CHOWN} ${BINOWN}:${BINGRP} ${STARTUP}

This doesn't seem to occur anywhere in FreeBSD 4.2 (the port is not present).
>How-To-Repeat:
Just try to use a Linux binary that depends on /proc, like VMware, /usr/ports/emulators/vmware2
>Fix:
Include like a two line file in the product:
/usr/src/etc/rc.d/linprocfs.sh
	#!/bin/sh
	[ -x /sbin/mount_linprocfs ] && kldload /modules/linprocfs.ko && ${PREFIX}/sbin/mount_linprocfs linprocfs /compat/linux/proc linprocfs'

and/or have sysinstall add a line to /etc/fstab something like
linproc /compat/linux linprocfs rw 0 0

It should be simple, relative to everything else in FreeBSD, which means a bit too hard and I'm not sure exactly what to do.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Sat May 26 10:09:14 PDT 2001 
State-Changed-Why:  
The linprocfs(5) man page adequately documents how to mount the filesystem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=24121 
>Unformatted:
