Bug 25460

Summary: Directory/INODE Editing
Product: Base System Reporter: cwible <cwible>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   

Description cwible 2001-02-28 18:10:01 UTC
There appears to be a general problem in FreeBSD with access to INODE's though editors and miscallaenous command line programs. For example, you can edit an INODE directly by typing "vi /etc", which will not work on most other UN*X OS's. Some programs such as edit, more and less do alert you that it is a directory, but many programs such vi, joe and cat do not. I am not quite sure why this is, or even if it is a bug, but it has caused some interesting problems such as the one described below.

If you are going to install a new kernel and decide to move your old modules directory out of the way first, when you perform a "make install" you will see that a new modules directory is not made; instead all of the modules are appended to a file called /modules. However, if you perform a mkdir manually first, it works. In other words, some portion of the "make install" is not checking for a directory and simply starts appending to a file instead. If you don't understand, try my steps about how to repeat the problem.

How-To-Repeat: vi /etc

--- or ---

cd /usr/src/sys/compile/kernel_name
rm -rf /modules
make install
less /modules
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2001-03-12 00:04:19 UTC
State Changed
From-To: open->closed

Don't do that then.  /modules is created by the mtree stuff 
in make world, which is the correct place for it. 

This incidentally doesn't have anything to do with the first 
half of your PR where you talk about being able to write to 
directory files