Gitiles
Code Review
Sign In
gerrit.onosproject.org
/
onos-loxi
/
refs/heads/master
/
.
/
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