[comp.unix.aix] /dev/null 644

3003jalp@ucsbuxa.ucsb.edu (Applied Magnetics) (02/20/91)

Can anyone explain how this happened ?  I am reporting it to IBM now.
    Last login at Wed Feb 20 07:16:12 1991 on hft/0
    -sh: /dev/null: 0402-011 Cannot create the specified file.
    -sh: /dev/null: 0402-011 Cannot create the specified file.
    $ ls -l /dev/null
    -rw-r--r--   1 root     system         0 Feb 20 07:16 /dev/null
--Pierre Asselin, R&D, Applied Magnetics Corp.  I speak for me.

ng@cfd.di.nrc.ca (Kai Ng) (02/21/91)

In article <9254@hub.ucsb.edu>, 3003jalp@ucsbuxa.ucsb.edu (Applied Magnetics) writes:
|> Can anyone explain how this happened ?  I am reporting it to IBM now.
|>     Last login at Wed Feb 20 07:16:12 1991 on hft/0
|>     -sh: /dev/null: 0402-011 Cannot create the specified file.
|>     -sh: /dev/null: 0402-011 Cannot create the specified file.
|>     $ ls -l /dev/null
|>     -rw-r--r--   1 root     system         0 Feb 20 07:16 /dev/null
|> --Pierre Asselin, R&D, Applied Magnetics Corp.  I speak for me.

Somehow the /dev/null disappeared and get reconstructed as an ordinary
file.

It is a known problem in AIX 3002 in which the command lsnfsexp always
destroys the null device.

-- 
-----------------------------------------------------------------------------
Kai S. Ng                     Informatics, National Research Council Canada
INTERNET ng@cfd.di.nrc.ca     M-60 Montreal Road, Ottawa, Canada    K1A 0R6
BITNET   kain@nrcvm01.bitnet  VOICE (613) 993-0240       FAX (613) 954-2561

john@johnmad.austin.ibm.com (02/21/91)

>Can anyone explain how this happened ?  I am reporting it to IBM now.
>    Last login at Wed Feb 20 07:16:12 1991 on hft/0
>    -sh: /dev/null: 0402-011 Cannot create the specified file.
>    -sh: /dev/null: 0402-011 Cannot create the specified file.
>    $ ls -l /dev/null
>    -rw-r--r--   1 root     system         0 Feb 20 07:16 /dev/null

Yes, Likely it is a bug in the /usr/etc/lsnfsexp script. 
It should be line 100. 
        rm -rf ${TMP_FILE} >/dev/null 2>&1 /dev/null
(Whoops!)
        rm -rf ${TMP_FILE} >/dev/null 2>&1

John

Statements made here are my personal views and do not reflect
policy or commitments of IBM Corporation.

John Maddalozzo			   
IBM Advanced Workstation Division  aesnet:	john@johnmad.austin.ibm.com
11400 Burnet Road, 994/3401	   vnet:	JOHNMAD at AUSVMQ
Austin, TX, 78758-3493		   phone:	+1 [512] 823-4837
		uucp:	cs.utexas.edu:ibmaus!auschs!johnmad.austin.ibm.com!john

marc@marc.watson.ibm.com (Marc Auslander) (02/22/91)

This can be caused by a defect in the 3003 version of
/usr/etc/lsnfsexp.  It contains an rm -f line with an extra /dev/null
on the end, which if executed removes /dev/null.

To fix the symptom:

rm -f /dev/null
mknod c 2 2 /dev/null

as root of course.

You can also edit lsnfsexp so it won't happen again.
--


Marc Auslander       <marc@ibm.com>

3003jalp@ucsbuxa.ucsb.edu (Applied Magnetics) (02/23/91)

Thanks to the many people who posted or e-mailed.  The culprit is an
AIX script, `/usr/etc/lsnfsexp', line 100.  The problem was not known
to IBM defect support.  It is now.  Ask for 9X037.

  --Pierre Asselin, R&D, Applied Magnetics Corp.  I speak for me.

wohler@sapwdf.UUCP (Bill Wohler) (02/26/91)

marc@marc.watson.ibm.com (Marc Auslander) writes:
>mknod c 2 2 /dev/null

>as root of course.

  you mean

	mknod /dev/null c 2 2

  of course.  good thing we had more than one aix machine--have you
  ever tried looking up the major and minor numbers of /dev/null in
  the documentation?

						--bw
						wohler@sap-ag.de