Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219495 - /etc/init.d/nfs{,mount} use non-portable `type -t`
Summary: /etc/init.d/nfs{,mount} use non-portable `type -t`
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-27 15:49 UTC by Davide Pesavento
Modified: 2008-05-05 04:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento (RETIRED) gentoo-dev 2008-04-27 15:49:55 UTC
/etc/init.d/nfs:        type -t config 2>/dev/null 1>&2 && config /etc/exports
/etc/init.d/nfsmount:   type -t config 2>/dev/null 1>&2 && config /etc/fstab

`type -t` is a bashism, it doesn't work with dash nor zsh.
(http://www.opengroup.org/onlinepubs/7990989775/xcu/type.html)

Possible fixes are:
(1) type config 2>/dev/null 1>&2 && config /etc/fstab
(2) command -v config 2>/dev/null 1>&2 && config /etc/fstab
(3) [ "$(command -v "config")" = "config" ] && config /etc/fstab
Comment 2 gent_bz 2008-05-05 03:46:58 UTC
You got the path wrong in nfs.initd - should be /etc/exports, not /etc/fstab.
Comment 3 SpanKY gentoo-dev 2008-05-05 04:36:17 UTC
just a copy & paste bug

http://sources.gentoo.org/net-fs/nfs-utils/files/nfs.initd?r1=1.13&r2=1.14