Skip to content

Commit 240d140

Browse files
committed
Remove whoami call
Replace the whoami call with $UID variable Fixes #102
1 parent 118867a commit 240d140

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

docker/base/alpine-3/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/centos-7/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/debian-7/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/debian-8/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/debian-9/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/ubuntu-12.04/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/ubuntu-14.04/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/ubuntu-15.04/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/ubuntu-15.10/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

docker/base/ubuntu-16.04/conf/bin/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TASK="$(echo $1| sed 's/[^-_a-zA-Z0-9]*//g')"
1313

1414
source /opt/docker/bin/config.sh
1515

16-
if [ "$(/usr/bin/whoami)" == "root" ]; then
16+
if [[ "$UID" -eq 0 ]]; then
1717
# Only run provision if user is root
1818

1919
if [ "$TASK" == "supervisord" -o "$TASK" == "noop" ]; then

0 commit comments

Comments
 (0)