]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
perf(nfs): remove references to old rpcbind state dir
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 12 Nov 2025 11:40:39 +0000 (12:40 +0100)
committerLaszlo <laszlo.gombos@gmail.com>
Tue, 18 Nov 2025 04:25:23 +0000 (23:25 -0500)
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

modules.d/74nfs/module-setup.sh
modules.d/74nfs/nfs-start-rpc.sh
modules.d/74nfs/parse-nfsroot.sh

index 7ced18ece1bd66cc2d3e155e583320f333e43faa..8b3fa86adaa580a833d2fbbb62d22385d3be2db9 100755 (executable)
@@ -117,7 +117,6 @@ install() {
     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 ]] \
index 641a58d23acc13e07c1380162abeccef8265b09c..75327ab24f3e435e495dca56fa657a896647250c 100755 (executable)
@@ -4,7 +4,7 @@ if load_fstype sunrpc rpc_pipefs; then
     [ ! -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
index 5ac7decacb360d2c89fe103befbab5a0145ddac3..a5982cfc32259f069eab1104513a0e623ac7d837 100755 (executable)
@@ -122,9 +122,3 @@ root="$fstype"
 
 # 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