[Top][All Lists]

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

Another batch of bugs spotted

From: Andrew Stribblehill
Subject: Another batch of bugs spotted
Date: Tue, 2 Oct 2001 15:05:35 +0100
User-agent: Mutt/1.3.20i

Using version 1.6.3, compiled from source on a RedHat 7.1
Alpha-architecture box.

Within the filters: section, the following is not parsed as valid

  { justDirs
  Type: "dir"
  Result: 'Type'

whereas when I change the single-quotes to double, i.e.

  { justDirs
  Type: "dir"
  Result: "Type"

it works fine.

The problem I mentioned last week regarding netmask was wrongly
reported. I should have said that $(netmask) wasn't expanded even
though it was specified in control.

So, the following fails:

  netmask = ( "" )

    { /etc/sysconfig/network-scripts/ifcfg-eth0
    BeginGroupIfNoLineContaining "BOOTPROTO=static"
      InsertLine "DEVICE=eth0"
      InsertLine "ONBOOT=yes"
      InsertLine "BOOTPROTO=static"
      InsertLine "IPADDR=$(ipaddress)"
      InsertLine "NETMASK=$(netmask)"
      InsertLine "GATEWAY=$(gateway)"
    BeginGroupIfNoSuchLine "IPADDR=$(ipaddress)"
      ReplaceAll "IPADDR=.*" With "IPADDR=$(ipaddress)"

The 'required' section seems to give erroneous results for me. I have
a standalone machine with purely local mounts. I have a section in
cfengine.conf as follows:

  /tmp  freespace=300Mb define=tidyTmp
  /tmp  freespace=100Mb define=urgentTidyTmp
  /var  freespace=100Mb define=tidyVar
  /var  freespace=20Mb  define=urgentTidyVar
  /home freespace=700Mb define=tidyHome
  /home freespace=200Mb define=urgentTidyHome

For each of these filesystems, cfengine checks they are 'sensible'
then CheckFreeSpace is called. CheckFreeSpace asks if a filesystem is
mounted by running IsMountedFileSystem. This bit of code goes like:

if (IsMountedFileSystem(&statbuf,file,1)) /* only do this on server */
   return true;

Each of the three paths specified are mountpoints for a filesystem,
and indeed IsMountedFileSystem returns 1 for all entries. It looks
like IsMountedFileSystem is intended to check that a FS is NFS
mounted, but for local filesystems, it goes wrong.

(Incidentally, I notice there is a percent feature for 'required'; is
it in the documentation anywhere?)


For the first two problems, I'd appreciate being told where to start
looking for a bug-fix; for the last one, someone with a better
architectural grasp of the software is probably better placed to fix

Andrew Stribblehill
Systems programmer, IT Service, University of Durham, England

reply via email to

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