[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: devfsd



Thanks for the reply.

Russell Coker <russell@coker.com.au> writes:

> open("/etc/devfs/conf.d/devfsd.conf", O_RDONLY) = 7
> fstat64(0x7, 0xbfffdc7c)                = 0
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
> = 0x40019000
> read(7, "", 4096)                       = 0
> close(7)                                = 0
> munmap(0x40019000, 4096)                = 0
> read(6, "", 4096)                       = 0
> close(6)                                = 0
> munmap(0x40018000, 4096)                = 0
> _exit(1)                                = ?
>
> The above is the tail of the output file.  It shows that the process is 
> exiting after discovering that /etc/devfs/conf.d/devfsd.conf is an empty 
> file.  Perhaps if you rm that file things will be better (I don't have such a 
> file on my system).

zw@q:~/ > sudo rm /etc/devfs/conf.d/devfsd.conf 
zw@q:~/ > su -c '/etc/init.d/devfsd start'
Password: 
Setting up symlinks in /dev...done.
Setting up extra devices in /dev...done.
Starting devfsd...Started device management daemon for /dev
error opening file: "/etc/devfs/conf.d/devfsd.conf"	No such file or directory
zw@q:~/ >

I remember the above is the reason I touched this file. So, a grep
find it's a weird dir.conf that INCLUDE this file, hmm. Now after I
clean up the dir.conf:

zw@q:~/ > su -c '/etc/init.d/devfsd start'
Password: 
Setting up symlinks in /dev...done.
Setting up extra devices in /dev...done.
Starting devfsd...Started device management daemon for /dev
zw@q:~/ > ps auxw|grep dev
zw         826  0.0  0.9  1564  584 pts/1    SN   10:57   0:00 grep dev
zw@q:~/ >

Now the tail of strace is as below:

open("/etc/devfs/dir.conf", O_RDONLY)   = 6
fstat64(0x6, 0xbfffe91c)                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(6, "# automatically generated by upd"..., 4096) = 57
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0x40018000, 4096)                = 0
_exit(1)                                = ?

Yet another grep find a INCLUDE line in /etc/devfsd/devfsd.conf for
dir.conf, remove that, still no luck, and tail strace:

read(7, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1055
close(7)                                = 0
munmap(0x40019000, 4096)                = 0
open("/etc/group", O_RDONLY)            = 7
shmat(7, 0xbfffdea8, 0x1)               = ?
shmat(7, 0xbfffdea8, 0x2)               = ?
fstat64(0x7, 0xbfffdc3c)                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000
_llseek(7, 0, [0], SEEK_CUR)            = 0
read(7, "root:x:0:zw\ndaemon:x:1:\nbin:x:2:"..., 4096) = 507
close(7)                                = 0
munmap(0x40019000, 4096)                = 0
brk(0x8070000)                          = 0x8070000
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0x40018000, 4096)                = 0
_exit(1)                                = ?

It's all normal and the 6 is:

open("/etc/devfs/perms", O_RDONLY)      = 6

Now I am at my wit's end. :( My /etc/devfs/devfsd.conf is as below
after removing comments:

REGISTER	.*		MKOLDCOMPAT
UNREGISTER	.*		RMOLDCOMPAT
REGISTER	.*		MKNEWCOMPAT
UNREGISTER	.*		RMNEWCOMPAT
INCLUDE				/etc/devfs/perms
LOOKUP 		snd 		EXECUTE /sbin/modprobe snd
REGISTER	sound/.* 	PERMISSIONS root.audio 666
REGISTER 	snd/.* 		PERMISSIONS root.audio 660
LOOKUP		ppp		EXECUTE /sbin/modprobe ppp_generic
LOOKUP		.*		MODLOAD

Thanks,
-- 
http://dim.sourceforge.net ............... Debian Chinese Input Method
http://njlug.sourceforge.net ............ NanJing GNU/Linux User Group
http://cdlinux.sourceforge.net ........... Debian running on Live! CDs
http://people.debian.org/~zw ...................... XEmacs Screenshots



Reply to: