services/device/internal/impl: prevent V23_CREDENTIALS from trumping agent
If V23_CREDENTIALS env var is set for device manager, then it trumps the agent
connection silently. This leads to hard to debug behavior which is most always
incorrect.
This change does two things:
1. complains if V23_CREDENTIALS is set when attempting to install device
manager; otherwise, V23_CREDENTIALS will be added to the device shell script
during self-install.
2. if the device manager is started via "deviced start" and we're not using init
mode, complain if V23_CREDENTIALS is set in the environment. We could have also
silently unset it, but complaining loudly seems safer. The user can then re-run
the start command with V23_CREDENTIALS unset or set to "".
Change-Id: If0709eca35ca5120d303d4255d2164fa8230d425
3 files changed