veyron/services/mgmt/device,veyron/tools/mgmt: introduce devicex
Devicex is a new shell script to manage the device manager. It subsumes the old
dminstall and dminstall scripts (which go away), and also adds commands for
start and stop. Unlike dminstall and dmuninstall, devicex is a very thin
wrapper on top of the commands provided by deviced -- the only real value-add is
for downloading binaries and setting the permissions on the setuid helper. The
idea is that you only need the devicex script to administer a device manager
installation on a given device. The integration test (test.sh) shows how this
can work. Also, the unit test TestDeviceManagerInstallation uses exclusively the
install/uninstall/start/stop commands in a similar fashion.
To make the stop command work, we now track the device manager's object name, so
we can send it a Stop RPC and get it to exit cleanly (and with a return exit
code that convices the agent to not restart it anymore).
Some work still left to do, specifically around fleshing out the "non-session"
mode where we want to register the device manager with the system daemon
(e.g. init.d)
Change-Id: Idea144b45837cbf8c33a4bc64971ee5fd7143a65
13 files changed