[howto] call dietpi-sync 1 without user interaction

That is correct. Our scripts, respectively dietpi-globals automatically detects whether it executes within an interactive shell with a STDIN attached and sets G_INTERACTIVE accordingly to skip whiptail menus. This is needed to assure that exactly such hangs are ruled out.

If you want to test scripts for non-interactive environment, than indeed call them with preceding export G_INTERACTIVE=0. Don’t forgot to unset it again, otherwise you cannot call other scripts’ menus anymore :wink:.

But you are right, the docs are not correct. We made the space check in dietpi-backup optional. I think we should do it similarly in dietpi-sync:

  • Make dry run a dedicated menu entry to run a dry run only and test settings that way.
  • Make free space check (which includes a dry run) an option (disabled by default) for the real sync, which then only prompts in interactive environment if the free space check fails.
  • Align with dietpi-backup, i.e. add a dedicated dry run option to dietpi-backup as well.