Prevent multiple instances of wimax-manager from running.

DBus::Connection::request_name() does not indicate whether it
successfully acquires the requested DBus name or not. This CL changes
wimax-manager to use newly introduced DBus::Connection::acquire_name()
(CL:195002) to ensure that wimax-manager can successfully acquire its
DBus name.

BUG=chromium:364585
TEST=Tested the following:
1. `USE=wimax FEATURES=test emerge-$BOARD platform2`
2. Manually run the following commands in a root shell on the DUT:
   - `stop wimax-manager` and then `start wimax-manager` works
   - `restart wimax-manager` works
   - `wimax-manager --foreground` fails to acquire the DBus name when
     another instance of wimax-manager is already running.

Change-Id: If6be050c668df96644ce9042256d0034fa463239
Reviewed-on: https://chromium-review.googlesource.com/195483
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
1 file changed