Random Project

bug if hostname includes ‘nfs’

Due to the “grep nfs” part it has a bug if your hostname has the letters “nfs” in it, and I guess the same applies for vg, lv or mount names as well.

Here’s a patch:

– Linux ) NFS_MOUNTS=`egrep -v ‘(^#)’ /etc/fstab | grep nfs | awk ‘{print $2}’`;;
+ Linux ) NFS_MOUNTS=`awk ‘!/^(s+)#/ && /(s+)nfs(s+)/ {print $2}’ /etc/fstab`;;