Skip to content

Unify, validate and/or robustly parse autoinstall.ini syntax

Summary

Currently the syntax of autoinstall.ini varies especially for yes/no statements. This can be seen in the example file: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/docs/autoinstall_samples/autoinstall.ini.sample?ref_type=heads. Currently the value is also not validated.

Looking at the code, it is also likely that syntax mistake failures vary; I stumbled on one mistake that caused a silent hang.

Example failing case:

echo "reconfigure_permissions_in_master_database=n" >> autoinstall.ini
php -q update.php --autoinstall=autoinstall.ini
<hangs forever with php process at 100% CPU>

The fix was obviously to instead declare reconfigure_permissions_in_master_database=no (note last character) but it took quite long to figure that out.

Suggested approaches

Any combination of:

  • Unify syntax
  • Add validator function
  • Pre-parse using the common [Yy]* and [Nn]* approach