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 <>
Reviewed-by: default avatarDenis Pynkin <>
Differential Revision:
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
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment