[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disks:freespace nightmare, local mounts require nasty workaround.
From: |
Mark . Burgess |
Subject: |
Re: disks:freespace nightmare, local mounts require nasty workaround. |
Date: |
Tue, 3 Sep 2002 22:05:36 +0200 (MET DST) |
>
> I have read about the model you propose in the cfengine reference
> document (regarding /$(site)/$(host) ), but I still don't understand
> why we can't do something like:
>
> disks:
> /home freespace=99% inform=true
>
> but we have to actually say:
>
> disks:
> /home/somedirectory freespace=99% inform=true
>
> And that's not all, 'somedirectory' needs to have at least one file
> there!
I don't understand this. It works fine for me. Exactly this example
in 2.0.4. But you have to have "disks" in the action sequence...
> But if I want to check: /usr, /home, /var, /tmp
>
> Then I thought I could do:
>
> control:
>
> FStoCheck = ( usr:home:var:tmp )
>
> files:
> /$(FStoCheck)/.cfengine_freespace/.cfengine owner=root group=root
> mode=0700 action=create
>
> disks:
> /$(FStoCheck)/.cfengine-freespace freespace=99% inform=true
>
> But it doesn't work, because iteration works only for the section
> "files:", but not for "disks:", so the directories and files are
> created but the disk space can't be checked so I would have to enter
> multiple lines in the "disks" section.
>
A patch for the iteration is simple, and I'm attaching src/install.c to
patch 2.0.4.
This then works with your example.
Mark
install.c
Description: Text document
- Re: disks:freespace nightmare, local mounts require nasty workaround.,
Mark . Burgess <=