Current-Users archive

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

Strange MAKEDEV problem



Hi,

On

 # uname -a
NetBSD support6 6.99.4 NetBSD 6.99.4 (MYDOMU) #5: Tue Mar 20 23:53:34
GMT 2012  root@support6:/usr/src/sys/arch/amd64/compile/MYDOMU amd64

using yesterday's XEN3_DOMU kernel (with MULTIPROCESSING, no
DIAGNOSTICS and DEBUG) I get for some reason all the devices made with
mode 000, as follows:

-----

root@support6 /devo # rm -r [a-z]*
root@support6 /devo # ./MAKEDEV std
root@support6 /devo # ls -l
total 88
-r-xr-xr-x  1 root  wheel   40279 Mar 21 09:37 MAKEDEV*
-r-xr-xr-x  1 root  wheel    2549 May  1  2008 MAKEDEV.local*
c---------  1 root  wheel   0,  0 Mar 21 09:53 console
c---------  1 root  wheel   0,  1 Mar 21 09:53 constty
c---------  1 root  kmem    4,  0 Mar 21 09:53 drum
c---------  1 root  wheel   7,  0 Mar 21 09:53 klog
c---------  1 root  kmem    2,  1 Mar 21 09:53 kmem
c---------  1 root  wheel  85,  0 Mar 21 09:53 ksyms
c---------  1 root  kmem    2,  0 Mar 21 09:53 mem
c---------  1 root  wheel   2,  2 Mar 21 09:53 null
c---------  1 root  wheel  22,  2 Mar 21 09:53 stderr
c---------  1 root  wheel  22,  0 Mar 21 09:53 stdin
c---------  1 root  wheel  22,  1 Mar 21 09:53 stdout
c---------  1 root  wheel   1,  0 Mar 21 09:53 tty
c---------  1 root  wheel   2, 12 Mar 21 09:53 zero

etc. as if I have umask 777.

If I use -m, I get:

root@support6 /devi # rm [a-z]*
root@support6 /devi # ./MAKEDEV -m /sbin/mknod std
root@support6 /devi # ls -la
total 96
drwxr-xr-x   2 root  wheel     512 Mar 21 09:58 ./
drwxr-xr-x  31 root  wheel    1024 Mar 21 09:57 ../
-r-xr-xr-x   1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
-r-xr-xr-x   1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
crw-r--r--   1 root  wheel   0,  0 Mar 21 09:58 console
crw-r--r--   1 root  wheel   0,  1 Mar 21 09:58 constty
crw-r--r--   1 root  kmem    4,  0 Mar 21 09:58 drum
crw-r--r--   1 root  wheel   7,  0 Mar 21 09:58 klog
crw-r--r--   1 root  kmem    2,  1 Mar 21 09:58 kmem
crw-r--r--   1 root  wheel  85,  0 Mar 21 09:58 ksyms
..

which just follows the mask;

with -t I get:

root@support6 /devi # rm [a-z]*
root@support6 /devi # ./MAKEDEV -t /usr/sbin/mtree  std
root@support6 /devi # ls -la
total 96
drwxr-xr-x   2 root  wheel     512 Mar 21 09:59 ./
drwxr-xr-x  31 root  wheel    1024 Mar 21 09:57 ../
-r-xr-xr-x   1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
-r-xr-xr-x   1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
c---------   1 root  wheel   0,  0 Mar 21 09:59 console
c---------   1 root  wheel   0,  1 Mar 21 09:59 constty
c---------   1 root  kmem    4,  0 Mar 21 09:59 drum
c---------   1 root  wheel   7,  0 Mar 21 09:59 klog
c---------   1 root  kmem    2,  1 Mar 21 09:59 kmem
....

just like with pax:

root@support6 /devi # ./MAKEDEV -p /bin/pax  std
root@support6 /devi # ls -l
total 88
-r-xr-xr-x  1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
-r-xr-xr-x  1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
c---------  1 root  wheel   0,  0 Mar 21 10:01 console
c---------  1 root  wheel   0,  1 Mar 21 10:01 constty
c---------  1 root  kmem    4,  0 Mar 21 10:01 drum
c---------  1 root  wheel   7,  0 Mar 21 10:01 klog
c---------  1 root  kmem    2,  1 Mar 21 10:01 kmem


-----

I tried to debug the script, but can't find any obvious reason.
Perhaps some missing files in /etc/mtree ?
-- 

Chavdar

----


Home | Main Index | Thread Index | Old Index