The default state directory (needed by `rpcbind` to save warm start info) was
initially `/tmp`, but it can be configured with `--with-statedir=` since [1].
This default state directory changed to a more appropriate `/var/run` [2], and
then explicitly to `/run` [3].
So, `/var/lib/rpcbind` existed when this dracut module was created because RH/
Fedora had it configured with `--with-statedir=`, like openSUSE until 2016 [4]
[1] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=
9b1aaa62d44515fa97bc62c00d3eae6c6c3e3c3d
[2] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=
2e78e6fb51292fea798355e5cb749dbc1de26ca6
[3] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=
fd1d5387de8078530d51eccf876afe6e6182b975
[4] https://build.opensuse.org/requests/440204/changes
inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh"
mkdir -m 0755 -p "$initdir/var/lib/nfs"
mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
- mkdir -m 0770 -p "$initdir/var/lib/rpcbind"
# use the same directory permissions as the host
[[ -d "${dracutsysrootdir-}"/var/lib/nfs/statd ]] \
[ ! -d /var/lib/nfs/rpc_pipefs/nfs ] \
&& mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
- # Start rpcbind or rpcbind
+ # Start rpcbind
# FIXME occasionally saw 'rpcbind: fork failed: No such device' -- why?
command -v portmap > /dev/null && [ -z "$(pidof portmap)" ] && portmap
if command -v rpcbind > /dev/null && [ -z "$(pidof rpcbind)" ]; then
# shellcheck disable=SC2016
echo '[ -e $NEWROOT/proc ]' > "$hookdir"/initqueue/finished/nfsroot.sh
-
-# rpc user needs to be able to write to this directory to save the warmstart
-# file
-mkdir -p /var/lib/rpcbind
-chown "$(get_rpc_user):root" /var/lib/rpcbind
-chmod 770 /var/lib/rpcbind