Commit e10d80d9 authored by Christian Mesh's avatar Christian Mesh Committed by GitHub

Add the ability to specify chown arguments for both home and extra

If people have a use case for recursive chowns that's fine.  I think it's dangerous for people to use, but that's tailored to my use case.
parent dee887e6
......@@ -40,11 +40,11 @@ if [ $(id -u) == 0 ] ; then
# Ex: default NFS/EFS (no auto-uid/gid)
if [[ "$CHOWN_HOME" == "1" || "$CHOWN_HOME" == 'yes' ]]; then
echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID"
chown $NB_UID:$NB_GID /home/$NB_USER
chown $CHOWN_HOME_OPTS $NB_UID:$NB_GID /home/$NB_USER
fi
if [ ! -z "$CHOWN_EXTRA" ]; then
for extra_dir in $(echo $CHOWN_EXTRA | tr ',' ' '); do
chown $NB_UID:$NB_GID $extra_dir
chown $CHOWN_EXTRA_OPTS $NB_UID:$NB_GID $extra_dir
done
fi
......
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