#!/usr/bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/nfsclient-show-mounts - show nf client mounts # # Copyright (c) 2001-2024 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2004-08-11 jed # Last Update: $Id$ # # 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 nfsmount_file=/var/run/nfsclient-mounts.list clrhome mecho --info "NFS mounts" mecho /usr/bin/mount | grep 'type nfs' | while read line do nfs_dir=`echo "${line}" | sed 's/^.* on \([-_./[:alnum:]]*\) .*$/\1/'` if [ -f ${nfsmount_file} ] then grep -q "^${nfs_dir}$" ${nfsmount_file} if [ $? -eq 0 ] then # mount of nfsclient package mecho -n --info "nfsclient-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 mecho anykey