OK. Thanks, that is working now, but the Wiki needs updating.
Now that the file is being generated with the correct filename however, the provisioning updates are still failing because the substitutional variables $ext, $password, and $desc are not being replaced in the generated file. $localip does work.