1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 15:09:27 +00:00

Fix bug in which rancher home dir is not owned by rancher user

This commit is contained in:
Darren Shepherd
2015-03-18 06:29:21 -07:00
parent 04ae0c104b
commit 87fa7272b7

View File

@@ -26,6 +26,13 @@ setup_ssh()
mkdir -p /var/run/sshd
}
RANCHER_HOME=/home/rancher
if [ ! -d ${RANCHER_HOME} ]; then
mkdir -p ${RANCHER_HOME}
chown rancher:rancher ${RANCHER_HOME}
chmod 2755 ${RANCHER_HOME}
fi
for i in $(</proc/cmdline); do
case $i in
rancher.password=*)
@@ -57,13 +64,6 @@ cat > /etc/respawn.conf << EOF
/usr/sbin/sshd -D
EOF
RANCHER_HOME=/home/rancher
if [ ! -d ${RANCHER_HOME} ]; then
mkdir -p ${RANCHER_HOME}
chown rancher:rancher ${RANCHER_HOME}
chmod 2755 ${RANCHER_HOME}
fi
if ! grep -q "$(hostname)" /etc/hosts; then
echo 127.0.1.1 $(hostname) >> /etc/hosts
fi