Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40026 - Removing a directory in /dev survives reboots
Summary: Removing a directory in /dev survives reboots
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-31 18:04 UTC by Krister Joas
Modified: 2004-05-03 12:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krister Joas 2004-01-31 18:04:29 UTC
Removing a directory in /dev is not reflected in /lib/dev-state and will be resurrected by a reboot.  There is a rule in the /etc/devfsd.conf which says:
DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
But unlink will fail if $devname refers to a directory.
This can happen when using lvremove for example.

Reproducible: Always
Steps to Reproduce:
1. mkdir /dev/foo
2. rmdir /dev/foo

Actual Results:  
Directory not removed in /lib/dev-state and error message appears in /var/log/messages:
devfsd[128]: error calling: "unlink" in "GLOBAL"


Expected Results:  
Corresponding directory should have been removed in /lib/dev-state.

Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.1-gentoo)
============================================================
=====
System uname: 2.6.1-gentoo i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
CHOST="i486-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/
config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.gg3.net/ http://ftp.gentoo.or.kr/ ftp://gg3.net/pub/linux/
gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
USE="X apm arts avi berkdb canna cjk crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk 
gtk2 imlib java jpeg libg++ libwww mad mikmod motif mozilla mpeg mule ncurses nls opengl oss 
pam pdflib perl png python quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xv 
zlib"
Comment 1 SpanKY gentoo-dev 2004-02-08 12:11:31 UTC
considering this *looks* to be a kernel bug and devfsd is pretty much dead upstream, what do you guys think we should do about this ?
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-15 11:26:29 UTC
I cannot remember if unlink calls rm .. you might try:

--
DELETE .* CFUNCTION GLOBAL unlink -rf /lib/dev-state/$devname
--

??
Comment 3 SpanKY gentoo-dev 2004-05-03 12:46:39 UTC
like i said, devfs is pretty much dead ... either use RC_DEVICE_TARBALL="no" in /etc/conf.d/rc or send a patch :)