Forum
Welcome, Guest
Username: Password: Remember me
This is the optional category header for the Suggestion Box.
  • Page:
  • 1

TOPIC: Code Problem & Fix

Code Problem & Fix 4 months 14 hours ago #1708

Code Problem in 7.6.0:

Line 369 of /etc/ha-lizard/ha-lizard.sh produces error in log when running "ha-cfg log"....

ha-lizard-ERROR-/etc/ha-lizard/init/ha-lizard.mon: /etc/ha-lizard/ha-lizard.sh: line 369: [: =: unary operator expected

Line 369 refers to if statement.
if [ $ha_lizard_STAT = "true" ]

Fix: Requires quotes
if [ "$ha_lizard_STAT" = "true" ]

Please Log in or Create an account to join the conversation.

Last edit: by Nathan.

Code Problem & Fix 4 months 8 hours ago #1711

Sorry... i should be more specific...

This is noted in XCP-ng 7.6.0

The variable $ha_lizard_STAT doesn't seem to require quotes in XCP-ng 7.5.0

Please Log in or Create an account to join the conversation.

Code Problem & Fix 4 months 6 hours ago #1713

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 549
Thanks. I'll take a look

Please Log in or Create an account to join the conversation.

Code Problem & Fix 3 months 3 weeks ago #1719

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 549
Nice catch. Thanks. This has been added to the release I'll post shortly.

The quotes will suppress the error.. The root cause is likely an empty or missing state file which causes the variable to be unset. Probably related to the XCP 7.6 issue

Please Log in or Create an account to join the conversation.

  • Page:
  • 1