Skip to content

Commit

Permalink
fix(k8s): init-kubectl shell file can be compatible with centos
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc authored and ibuler committed Aug 25, 2020
1 parent 1e57e49 commit ead0e9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/locale/zh_CN/LC_MESSAGES/koko.po
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ msgstr "系统用户<%s>和kubernetes<%s>协议不一致"
#: pkg/proxy/k8sproxy.go:98
#, fuzzy
msgid "%s protocol client not installed."
msgstr "%s 协议的数据库客户端未安装"
msgstr "%s 协议的客户端未安装"

#. i18n.T
#: pkg/proxy/k8sproxy.go:106
Expand Down
7 changes: 7 additions & 0 deletions utils/init-kubectl.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash
set -e
function init_nobody_user(){
echo `getent passwd | grep 'nobody' | grep '/nonexistent' || usermod -d /nonexistent nobody` > /dev/null 2>&1
echo `getent group | grep 'nogroup' || groupadd nogroup` > /dev/null 2>&1
}
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
init_nobody_user

if [ "${WELCOME_BANNER}" ]; then
echo ${WELCOME_BANNER}
Expand Down Expand Up @@ -41,6 +47,7 @@ if [ ${KUBECTL_INSECURE_SKIP_TLS_VERIFY} == "true" ];then
fi

chown -R nobody:nogroup .kube
chown -R nobody:nogroup .bashrc

export TMPDIR=/nonexistent

Expand Down

0 comments on commit ead0e9d

Please sign in to comment.