help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "disks"/"required" for all local disks


From: Mark . Burgess
Subject: Re: "disks"/"required" for all local disks
Date: Tue, 14 Sep 2004 22:22:28 +0200 (MEST)

This will take me a while to answer. If the list expansion does
not currently work, then it can easily be fixed. I need to spend
a couple of days catching up on cfengine stuff ... I am way behind.

M

On 14 Sep, John Borwick wrote:
> Hey.  Thanks very much for the help with finding out the interface.  I 
> ended up using ${global.ipv4[eth0]} for the IP address and
> 
>      eth0_gateway = ( ExecResult(/bin/sh -c "echo `ifconfig eth0 | grep 
> 'inet' | cut -d: -f2 | cut -d. -f-3`.254") )
> 
> for the gateway.
> 
> Next trick:  I'm trying to assert that all the local disks have a 
> certain amount of space free.  I tried
> 
> control:
>          actionsequence = ( disks )
> 
>      partitions = ( ExecResult(/bin/sh -c "df -l | grep '%' | perl 
> -F\\s+ -alne 'print $F[5]'"))
> 
> disks:
>     $(partitions) freespace=100M
> 
> 
> But this doesn't work because $(partitions) is expanded as a string 
> rather than as a list.
> 
> If it's not possible, that's cool; we'll monitor it with SNMP instead.
> 
> Thanks!
> Yours,
> John



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]