summaryrefslogtreecommitdiffstats
path: root/modules.d/95nfs/nfs-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmodules.d/95nfs/nfs-lib.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh
index 7896da9..52fa97b 100755
--- a/modules.d/95nfs/nfs-lib.sh
+++ b/modules.d/95nfs/nfs-lib.sh
@@ -155,3 +155,16 @@ mount_nfs() {
fi
mount -t "$nfs" -o"$options" "$server:$path" "$mntdir"
}
+
+get_rpc_user() {
+ while read -r line; do
+ user="${line%%:*}"
+ case $user in
+ _rpc | rpc | rpcuser | nfsnobody)
+ echo "$user"
+ return
+ ;;
+ esac
+ done < /etc/passwd
+ echo "root"
+}