[Ferm] Conditional variable definition

Kiss Gabor (Bitman) kissg at ssg.ki.iif.hu
Mon Mar 31 10:39:26 CEST 2014


> This seems to be not working:
> 
> @if @eq($TZ,'+0100') {
>     @def $WORKING_HOURS_START="07:30";
>     @def $WORKING_HOURS_STOP ="17:00";
> }
> @else {
>     @def $WORKING_HOURS_START="06:30";
>     @def $WORKING_HOURS_STOP ="16:00";
> }
> 
> $WORKING_HOURS_START has empty value.

Got it.
It was a scope issue.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578448

This works well:
@if @eq($TZ,'+0100') @def $WORKING_HOURS_START="07:30";
@else                @def $WORKING_HOURS_START="06:30";
@if @eq($TZ,'+0100') @def $WORKING_HOURS_STOP ="17:00";
@else                @def $WORKING_HOURS_STOP ="16:00";

Gabor


More information about the Ferm mailing list