NetBSD-Bugs archive

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

Re: port-atari/40316: "df: not found" printed while MAKEDEV allruns on NetBSD Atari install



The following reply was made to PR port-atari/40316; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: apb%cequrux.com@localhost, gnats-bugs%NetBSD.org@localhost
Cc: port-atari-maintainer%NetBSD.org@localhost, 
gnats-admin%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost, dross%pobox.com@localhost, 
tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV allruns
         on NetBSD Atari install
Date: Sat, 3 Jan 2009 18:08:36 +0900

 Alan Barrett wrote:
 
 >  Please try the appended patch.
 >  
 >  Index: etc/MAKEDEV.tmpl
 >  --- etc/MAKEDEV.tmpl        28 Nov 2008 16:04:31 -0000      1.118
 >  +++ etc/MAKEDEV.tmpl        2 Jan 2009 12:05:10 -0000
 >  @@ -478,8 +478,22 @@
 >   
 >      # Check if we have fdesc mounted
 >      if [ -d fd ]; then
 >  -           case "$(df fd)" in
 >  -           *fdesc*)        nofdesc=false;;
 >  +           # Parse the output from "mount -u -o nosuchoption .".
 >  +           #
 >  +           # If the current directory is a mount point for the
 >  +           # fdesc file system, then the expected output (whether
 >  +           # or not the current user is root) is:
 >  +           #       mount_fdesc: -o suchoption: option not supported.
 >  +           #
 >  +           # If the current directory is not a mount point, then
 >  +           # we expect the output to be:
 >  +           #       mount: .: unknown special file or file system.
 >  +           #
 >  +           # If we are not running on NetBSD, or mount(8) is not
 >  +           # found, then we should get some other error message.
 >  +           #
 >  +           case "$({ LC_ALL=C mount -u -o nosuchoption . ; } 2>&1)" in
 >  +           *mount_fdesc*)  nofdesc=false;;
 >              *)              nofdesc=true;;
 >              esac
 >      else
 
 Shouldn't it be "mount -u -o nosuchoption fd", rather than "." ?
 i.e. shouldn't a mount point for mount_fdesc be /dev/fd, not /dev?
 
 Isn't it simpler to check output of mount(8) with no option?
 ---
 # mount | grep "^fdesc on `pwd`/fd "
 fdesc on /dev/fd type fdesc (local)
 # umount /dev/fd
 # mount | grep "^fdesc on `pwd`/fd "
 #
 ---
 
 Anyway, sysinst.fs for atari seems to have some free space
 so adding df(1) into it might be safer for netbsd-5 branch
 because changes against MAKEDEV.tmpl affects all ports
 and crossbuild environments.
 ---
 Izumi Tsutsui
 


Home | Main Index | Thread Index | Old Index