Fix skel directory show up in homedir

When using find to create a user homedir from /etc/skel, use -mindepth
option. It means to process all files except the starting-points
Signed-off-by: Ritesh Raj Sarraf's avatarRitesh Raj Sarraf <ritesh.sarraf@collabora.com>
Reviewed-by: 's avatarDenis Pynkin <d4s@phabricator.apertis.org>
Differential Revision: https://phabricator.apertis.org/D7917
parent 9941c6c2
......@@ -23,5 +23,5 @@ test -d $HOMEDIR && exit 0
echo "Creating homedir for UID ${UID}"
mkdir -p $HOMEDIR
find /etc/skel -maxdepth 1 -exec cp -vPax {} $HOMEDIR \;
find /etc/skel -maxdepth 1 -mindepth 1 -exec cp -vPax {} $HOMEDIR \;
chown -R ${UID}:${UID} $HOMEDIR
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment