#true()
DESCRIPTION
returns TRUE (1)
SYNOPSIS
#true()
ARGUMENTS
none
EXAMPLES
# pikt +C 'output $text(#true())'
1
rule
set #doheader = #true()
begin
=initmisscrit
if $alert() =~ "DownSystems|DownServers|DownClients"
set #interactive = #true()
else
set #interactive = #false()
fi
rule // report unusually high cpu usage
if #cpuid <= #cpuidlim
#if missioncritical
=hourly(output mail $inlin set #dotopps = #true(), )
#else
=every_four_hours(output mail $inlin set #dotopps = #true(), )
#endif
endif
end
if #dotopps
&& $alert() ne "CPUUsage"
output mail =newline
=outputfile(mail, "=hstdir/log/top.CPUUsage")
output mail =newline
=outputfile(mail, "=hstdir/log/ps.CPUUsage")
fi
rule
if #length($password) == 0
&& $left($user,1) ne "+"
output mail "User $user has NO PASSWORD!"
if $user eq "root"
set #crisis = #true()
endif
endif
# ifdef page
# if missioncritical
end
if #crisis
=page($hostname() urgent shadow problem (see alert email),
=pagesysadmins, =allhours(#now()))
endif
# endif
# endifdef
rule
set #mounted[$filesys] = #true()
end
if #fopen(FSTAB, "=fstab", "r") == #err()
output mail "Missing =fstab!"
quit
endif
while #read(FSTAB) > 0
if $rdlin =~ "^[[:space:]]*#+"
|| $rdlin =~ "^/dev/(fd|cdrom)"
cont // bypass comments and others
fi
set #n = #split($f, $rdlin, " ")
if $f[3] =~ "ext2"
set $mntpt = $f[2]
else // is swap, nfs, procfs, floppy, cdrom, etc.
cont
fi
if #mounted[$mntpt] != #true()
// if =offhours(#now()) || =weekend
// =exec "=mount $f[1] $mntpt"
// else
output mail "not mounted: $rdlin"
// fi
fi
endwhile
do #fclose(FSTAB)
SEE ALSO
#and()
#or()
#false()
#not()
#if()
Numerical Functions
String Functions