[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: editfiles / miscmounts question
From: |
Brendan Strejcek |
Subject: |
Re: editfiles / miscmounts question |
Date: |
Mon, 9 Feb 2004 20:35:15 -0600 |
User-agent: |
Mutt/1.3.28i |
Ed Brown wrote:
> If there exists an NFS mount entry for /home, I'd like to delete the
> local partition entry. How can I edit a file, based on a positive match?
This works for me:
<hack>
classes:
nfs_home = ( ReturnsZero(/bin/egrep '.*/home.*nfs.*' /etc/fstab) )
editfiles:
{ /etc/fstab
BeginGroupIfDefined "nfs_home"
DeleteLinesMatching "^.*/home.*ext3.*$"
EndGroup
}
</hack>
It would be nice to have some other positive conditionals.