X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/e4b0643fb5ab70a1a01c48a3c6208e38228e4613..f11e373fdf34b810fc99c0f1abcb6bb093b119e6:/tools/__init__.py diff --git a/tools/__init__.py b/tools/__init__.py index 2afdf42..ac67a03 100644 --- a/tools/__init__.py +++ b/tools/__init__.py @@ -31,10 +31,16 @@ def main(): args.sudo_timer = True args.timeout = 1800 - if not os.path.isfile(args.config): + if not actions.initializer.is_initialized(args): if args.action and (args.action != "init" and args.action != "log"): - print('ERROR: WayDroid is not initialized, run "waydroid init"') - return 0 + if not args.wait_for_init: + print('ERROR: WayDroid is not initialized, run "waydroid init"') + return 0 + + print('WayDroid waiting for initialization...') + while helpers.ipc.listen(channel="init") != "done": + pass + elif os.geteuid() == 0 and args.action == "init": if not os.path.exists(args.work): os.mkdir(args.work)