Gitiles
Code Review
Sign In
gerrit.onosproject.org
/
onos-loxi
/
d3312ab3bc356378b37dec46c099b07ede758bdf
/
.
/
docker
/
run-as-loxi
blob: 31e9a389b2a96adf3f9b3f6593dbd2e176543a61 [
file
] [
log
] [
blame
]
#!/bin/bash -e
loxi_uid
=
$
(
stat
-
c
'%u'
/
loxi
/
loxigen
.
py
)
loxi_gid
=
$
(
stat
-
c
'%g'
/
loxi
/
loxigen
.
py
)
usermod
-
u $loxi_uid
-
g $loxi_gid loxi
||
echo
"ok"
cd
/
loxi
if
[[
"$*"
]];
then
sudo
-
u loxi
-
i
/
bin
/
bash
-
c
"$*"
else
sudo
-
u loxi
-
i
/
bin
/
bash
fi