#!/bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/nfs-client-show-mounts - show nf client mounts # # Creation: 2021-12-06 hbfl # Last Update: $Id$ # # Copyright (c) 2001-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------------- # read eislib . /var/install/include/eislib nfs_fstab=/var/lib/nfs/nfs-client.mounts clrhome mecho --info 'NFS mounts' echo /usr/bin/mount | /usr/bin/grep 'type nfs' | while read line do nfs_dir=$(echo "${line}" | cut -d ' ' -f3) > /run/nfs-dir if [ -f ${nfs_fstab} ] then nfs_dir=$(echo "${nfs_dir}" | sed 's|\/||; s|\/|-|g') if /usr/bin/grep -q "^${nfs_dir}.[mount|automount]" ${nfs_fstab} then # mount of nfsclient package mecho -n --info 'nfs-client-mount: ' else # other nfs mount mecho -n --warn 'other nfs-mount: ' fi echo "${line}" else # nfsclient mounts doesn't exist mecho -n --warn 'other nfs-mount: ' echo "${line}" fi done if [ ! -f /run/nfs-dir ] then echo mecho --warn 'No NFS mounts available' echo fi /usr/bin/rm -f /run/nfs-dir echo anykey