• Bug#1105748: ifclass: no dashes in fai class check

    From Matthias.Stecher@Stuttgarter.de@21:1/5 to All on Wed May 14 13:30:01 2025
    Package: fai-client
    Version: 6.4-0~202504171834~ubuntu22.04.1
    X-Debbugs-CC: juri.grabowski@stuttgarter.de

    Hello dear Maintainers,

    I've discovered since the tagged version problems with the ifclass utility.

    The following call results to an error:
    if ifclass H113-20-12; then
    Syntax error or invalid truth value in expression: 'H113-20-12' at /usr/bin/ifclass line 69.

    The error can be reproduced in the following way:
    $ perl -e 'use Eval::Logic; Eval::Logic->new("foo-bar");'
    Syntax error or invalid truth value in expression: 'foo-bar' at -e line 1.
    $ perl -e 'use Eval::Logic; Eval::Logic->new("foobar");'
    $

    Our client workstation naming includes dashes all the time. Hostname is automaticly set as FAI class e.g. for such checks.
    Currently working on a workaround as we need something for a special workstation.

    How can this be solved generally?

    Best regards,
    Matthias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)