added checks for correct home dir and shell

This commit is contained in:
Manuel Friedli 2014-01-27 22:45:34 +01:00
parent f260cb49c3
commit 9004f6ec62
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,3 @@
AUX gitlab-shell-1.8.0-paths-from-config.patch 1725 SHA256 b730b953f5cbb7b1c248cf56074832018f78a8bdcc20f2e3869fd30be03b03e4 SHA512 ac214bdcf4d6c63d61914c11d14b24136b4eb0cda4bd09476b58e6bfedfd5a5245a5d20f128d57d05b945afa03fa56f85c4c4df8508767443720596c7beaeddc WHIRLPOOL bed74d3544be5132818a9a42770c9c9775e6b491811ff23eb186f8ea19a86912dbc399c8f92ff7d6c5f951dafd21f4f893495d3d622d5be6af02205ed3b77e06 AUX gitlab-shell-1.8.0-paths-from-config.patch 1725 SHA256 b730b953f5cbb7b1c248cf56074832018f78a8bdcc20f2e3869fd30be03b03e4 SHA512 ac214bdcf4d6c63d61914c11d14b24136b4eb0cda4bd09476b58e6bfedfd5a5245a5d20f128d57d05b945afa03fa56f85c4c4df8508767443720596c7beaeddc WHIRLPOOL bed74d3544be5132818a9a42770c9c9775e6b491811ff23eb186f8ea19a86912dbc399c8f92ff7d6c5f951dafd21f4f893495d3d622d5be6af02205ed3b77e06
DIST gitlab-shell-1.8.0.tar.gz 14912 SHA256 ac75e2a5d234f4e64760e2eda5a94c633ec2b31c269deda01e69c6bbc0a25feb SHA512 ab829b597e4610675c773be83035506a97dc623c41f294c94b57fc7351d7985156c5882ba9b1c84d140fe0e0b5c613ab138f8161eee82c4727d049aa39e17efe WHIRLPOOL 72896d55d828d7c9539168391206a908c4a899079eb9bd1461fcdca4947abd806ca91a098d6c4bd67e1f15089636b960704f89285613b86588d039e7b4df4912 DIST gitlab-shell-1.8.0.tar.gz 14912 SHA256 ac75e2a5d234f4e64760e2eda5a94c633ec2b31c269deda01e69c6bbc0a25feb SHA512 ab829b597e4610675c773be83035506a97dc623c41f294c94b57fc7351d7985156c5882ba9b1c84d140fe0e0b5c613ab138f8161eee82c4727d049aa39e17efe WHIRLPOOL 72896d55d828d7c9539168391206a908c4a899079eb9bd1461fcdca4947abd806ca91a098d6c4bd67e1f15089636b960704f89285613b86588d039e7b4df4912
EBUILD gitlab-shell-1.8.0.ebuild 2917 SHA256 aba1bb7b5a671aea60305e21dbaa92f067e58edcfb2a9cf82908aecaf7701593 SHA512 858b6510704a7b40f5782adfdb6fd612102202f9827adeb3b600ee0b5fc94cd38af7de878418af9576e8b00c15000f7ed7d1c70b5352b3263379bb2de9fdbba5 WHIRLPOOL 27acd111650b5c7583745165bd4c9d519cf519e0663dc1652e67e6ddd8ac3b495701ad1c6089588e8d1eda78442540e9d495f3059b032b5502570749ff26a904 EBUILD gitlab-shell-1.8.0.ebuild 3548 SHA256 e633136ce4176d50f70a10d1ac0b074991730d7050bcb199b795732f2f34a777 SHA512 e5c60c2d8ffae16523a954f34f945e039beeaa94f81a8e3506088eff47d6d9fd78af4d8638e64ec4e26bf01ba3b92e4ea0a3a63e3daf2d3cfbbd5a2a8bbbc74b WHIRLPOOL d4d4f9405b0a9abe974bc22f8002e85844b8e4302322bd9fadb748c8644f83e4d82b595a0ba67d49d7c69d061b876dae40a7109b6c551340f9afa51c7f162efb

View file

@ -38,6 +38,17 @@ CONF_FILE="/etc/gitlab-shell.yml"
pkg_setup() { pkg_setup() {
enewgroup ${GIT_USER} enewgroup ${GIT_USER}
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}" enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
# who knows, perhaps the user "git" already exists, but with wrong home dir or shell ... perform some checks
local thehomedir=$(egethome "${GIT_USER}")
local theshell=$(egetshell "${GIT_USER}")
if [[ "${thehomedir}" != "${DATA_DIR}" ]] ; then
ewarn "User ${GIT_USER} exists and has home directory ${thehomedir}, but ${DATA_DIR} is required."
ewarn "Please adjust the home directory by hand after the installation!"
fi
if [[ "${theshell}" != "/bin/bash" ]] ; then
ewarn "User ${GIT_USER} exists and has shell ${theshell}, but /bin/bash is required."
ewarn "Please adjust the shell by hand after the installation!"
fi
} }
all_ruby_prepare() { all_ruby_prepare() {