mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 00:46:58 +02:00
fix(*): move /home/core/user to /home/core
This commit is contained in:
parent
589a10d8d5
commit
3970d28b5a
@ -106,6 +106,10 @@ src_install() {
|
|||||||
|
|
||||||
# target-specific fun
|
# target-specific fun
|
||||||
if ! use cros_host ; then
|
if ! use cros_host ; then
|
||||||
|
# Add a /srv directory for mounting into later
|
||||||
|
dodir /srv
|
||||||
|
keepdir /srv
|
||||||
|
|
||||||
dodir /bin /usr/bin
|
dodir /bin /usr/bin
|
||||||
|
|
||||||
# Make mount work in the way systemd prescribes
|
# Make mount work in the way systemd prescribes
|
||||||
@ -165,7 +169,7 @@ pkg_postinst() {
|
|||||||
# build roots we copy over the user entries if they already exist.
|
# build roots we copy over the user entries if they already exist.
|
||||||
local system_user="core"
|
local system_user="core"
|
||||||
local system_id="1000"
|
local system_id="1000"
|
||||||
local system_home="/home/${system_user}/user"
|
local system_home="/home/${system_user}"
|
||||||
# Add a chronos-access group to provide non-chronos users,
|
# Add a chronos-access group to provide non-chronos users,
|
||||||
# mostly system daemons running as a non-chronos user, group permissions
|
# mostly system daemons running as a non-chronos user, group permissions
|
||||||
# to access files/directories owned by chronos.
|
# to access files/directories owned by chronos.
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI="4"
|
EAPI="4"
|
||||||
CROS_WORKON_PROJECT="chromiumos/platform/dev-util"
|
CROS_WORKON_PROJECT="coreos/dev-util"
|
||||||
|
CROS_WORKON_REPO="git://github.com"
|
||||||
CROS_WORKON_LOCALNAME="dev"
|
CROS_WORKON_LOCALNAME="dev"
|
||||||
|
CROS_WORKON_LOCALDIR="src/platform"
|
||||||
|
|
||||||
inherit cros-workon
|
inherit cros-workon
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/usr/bin/block-until-url http://169.254.169.254/
|
/usr/bin/block-until-url http://169.254.169.254/
|
||||||
|
|
||||||
USER_DIR="/home/core/user"
|
USER_DIR="/home/core"
|
||||||
|
|
||||||
if [ ! -d ${USER_DIR}/.ssh ] ; then
|
if [ ! -d ${USER_DIR}/.ssh ] ; then
|
||||||
mkdir -p ${USER_DIR}/.ssh
|
mkdir -p ${USER_DIR}/.ssh
|
||||||
|
@ -55,7 +55,7 @@ DISTDIR="/var/lib/portage/distfiles-target"
|
|||||||
|
|
||||||
# Username and home directory of the shared user.
|
# Username and home directory of the shared user.
|
||||||
SHARED_USER_NAME="core"
|
SHARED_USER_NAME="core"
|
||||||
SHARED_USER_HOME="/home/core/user"
|
SHARED_USER_HOME="/home/core"
|
||||||
SHARED_USER_PASSWD_FILE="/etc/shared_user_passwd.txt"
|
SHARED_USER_PASSWD_FILE="/etc/shared_user_passwd.txt"
|
||||||
|
|
||||||
# the AC_FUNC_WAIT3 macro uses runtime-checks for the function, which
|
# the AC_FUNC_WAIT3 macro uses runtime-checks for the function, which
|
||||||
|
@ -22,9 +22,9 @@ if [ $? -eq 0 ] && [ ! -z "$USER_DATA" ]; then
|
|||||||
# validate ssh key
|
# validate ssh key
|
||||||
ssh-keygen -l -f $TMP > /dev/null 2>&1
|
ssh-keygen -l -f $TMP > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
cat $TMP >> /home/core/user/.ssh/authorized_keys
|
cat $TMP >> /home/core/.ssh/authorized_keys
|
||||||
echo "SSH key updated"
|
echo "SSH key updated"
|
||||||
chown -R core: /home/core/user/.ssh/
|
chown -R core: /home/core/.ssh/
|
||||||
else
|
else
|
||||||
echo "Not a valid ssh key"
|
echo "Not a valid ssh key"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user