FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

LinkBack Thread Tools
Old 03-29-2011, 05:52 PM
"Patrick Näf"
Default Bug#620072: /etc/init.d/nfs-kernel-server uses unsupported "/dev/tcp" bashism

Package: nfs-kernel-server
Version: 1:1.2.2-5

I casually tried to set up an NFS server, just to see if I can get it
working. I installed nfs-kernel-server via aptitude, edited /etc/exports,
and finally tried to start the NFS server daemon.

This is the output of the startup command (slightly edited for privacy):

foobar:/etc# /etc/init.d/nfs-kernel-server start
Exporting directories for NFS kernel daemon...exportfs: /etc/exports [1]:
Neither 'subtree_check' or 'no_subtree_check' specified for export
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x

Starting NFS kernel daemon: nfsd
Not starting: portmap daemon is not running (warning).

OK, I then check about portmap:

foobar:/etc# ps aux | grep [p]ortmap
daemon 19692 0.0 0.1 1796 548 ? Ss 19:39 0:00

Seems to be running. I then have a look at /etc/init.d/nfs-kernel-server:

# See if portmap or rpcbind are running
(cat </dev/null >/dev/tcp/localhost/111) 2>/dev/null
if [ $RET != 0 ]; then
log_warning_msg "Not starting: portmap daemon is not running"
exit 0

What is this "/dev/tcp/localhost/111"? After some googling I find that
this is a bashism, but the init-script is marked as a bash script at the


I then consult "man bash" and find the following line:

NOTE: Bash, as packaged for Debian, does not support using the /dev/tcp
and /dev/udp files.

If my analysis is correct, please modify /etc/init.d/nfs-kernel-server so
that it checks for portmap presence in a portable (or Debian) way.


To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: bd468cdb481b7b4e0921ec153c7cd91f.squirrel@mail.her zbube.ch">http://lists.debian.org/bd468cdb481b7b4e0921ec153c7cd91f.squirrel@mail.her zbube.ch

Thread Tools

All times are GMT. The time now is 02:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org