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 all runs on NetBSD Atari install



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

From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV all
        runs on NetBSD Atari install
Date: Fri, 2 Jan 2009 14:08:57 +0200

 On Fri, 02 Jan 2009, Alan Barrett wrote:
 >  As a quick workaround, change $(df fd) to $(nooutput -2 df fd) in line
 >  481 of src/etc/MAKEDEV.tmpl.  This will simply suppress the error
 >  message.  I am working on a way of detecting whether the desc file
 >  system is mounted, without using the df command.
 
 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
 


Home | Main Index | Thread Index | Old Index