Skip to content
Snippets Groups Projects
Commit d7083f31 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

overlays/create-homedir: Subsume homedir creation from apertis-customizations


Subsume the apertis-create-homedir systemd unit creating $HOME at boot time
that was formerly shipped by apertis-customizations.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 8ef56e50
No related branches found
No related tags found
1 merge request!93Subsume the useful bits of the apertis-customizazions package in the recipes
......@@ -481,6 +481,9 @@ actions:
- action: overlay
source: overlays/loopback-interface
- action: overlay
source: overlays/create-homedir
- action: overlay
source: overlays/default-locale-c-utf8
......
......@@ -382,6 +382,9 @@ actions:
- action: overlay
source: overlays/loopback-interface
- action: overlay
source: overlays/create-homedir
- action: overlay
source: overlays/default-locale-c-utf8
......
......@@ -91,6 +91,9 @@ actions:
- action: overlay
source: overlays/loopback-interface
- action: overlay
source: overlays/create-homedir
- action: overlay
source: overlays/default-locale-c-utf8
......
......@@ -675,6 +675,9 @@ actions:
- action: overlay
source: overlays/loopback-interface
- action: overlay
source: overlays/create-homedir
- action: overlay
source: overlays/default-locale-c-utf8
......
......@@ -204,6 +204,9 @@ actions:
- action: overlay
source: overlays/loopback-interface
- action: overlay
source: overlays/create-homedir
- action: overlay
source: overlays/default-locale-c-utf8
......
[Unit]
Description=Ensure that uid 1000 has a home directory
Before=systemd-user-sessions.service
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/sbin/apertis-create-homedir-if-needed 1000
[Install]
WantedBy=multi-user.target
#!/bin/sh
# Copyright © 2015 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -e
test -n "$1" || exit 1
UID=$(echo $1 | cut -d '-' -f 2);
test -n "$UID" || exit 1
HOMEDIR=$(getent passwd ${UID} | cut -d ':' -f 6)
test -n "$HOMEDIR" || exit 1
echo ${HOMEDIR}
test -d $HOMEDIR && exit 0
echo "Creating homedir for UID ${UID}"
mkdir -p $HOMEDIR
find /etc/skel -maxdepth 1 -mindepth 1 -exec cp -vPax {} $HOMEDIR \;
chown -R ${UID}:${UID} $HOMEDIR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment