Update file run_onchange_before_20-ensure-user-group.sh.tmpl
This commit is contained in:
parent
87414c9d63
commit
62ed0d317c
1 changed files with 34 additions and 29 deletions
|
@ -8,6 +8,8 @@
|
|||
{{ includeTemplate "universal/profile-before" }}
|
||||
{{ includeTemplate "universal/logg-before" }}
|
||||
|
||||
if [ -n "$USER" ]; then
|
||||
logg info "Adding the $USER user to the $USER group"
|
||||
### Ensure user has group of same name (required for Macports)
|
||||
logg info "Ensuring user ($USER) has a group with the same name ($USER) and that it is a member. Sudo privileges may be required"
|
||||
|
||||
|
@ -41,4 +43,7 @@ fi
|
|||
|
||||
### Add user to group
|
||||
sudo dseditgroup -o edit -t user -a $USERNAME $GROUP
|
||||
else
|
||||
logg warn 'The USER environment variable is unavailable'
|
||||
fi
|
||||
{{ end -}}
|
||||
|
|
Loading…
Reference in a new issue