Support starting as current user without start-stop-daemon
If start-stop-daemon isn't available on this system, and we are
not running as root, run as the current user. This avoids the
failure caused by su denying access to the root account.
If $UID isn't defined by /bin/sh (its a GNU bash extension), we
now initialize it to the current user id, from `id -u`. This is
supposedly part of the POSIX standard and should be available on
all systems.
Change-Id: Ia17b360c9e6384c5e2425a85e389d65910fc0ba8
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed