Skip to content

Commit

Permalink
omit sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
jakerundall committed Dec 7, 2023
1 parent b6c30fc commit 4b9387d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions templates/quota.csh.epp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# quota.csh: Managed by Puppet

# if the user is NOT in $profile_user_environment::quota::skip_users, run the scripts
# only run if:
# 1. the user is NOT in $profile_user_environment::quota::skip_users, AND
# 2. the user hasn't switched identity
whoami | egrep -q '^(<%= join($profile_user_environment::quota::skip_users, "|") %>)$'
if ( $? != 0 ) then
if ( $? != 0 && $USER == `logname` ) then

# run quota scripts
echo ""
Expand Down
6 changes: 4 additions & 2 deletions templates/quota.sh.epp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# quota.sh: Managed by Puppet

# if the user is NOT in $profile_user_environment::quota::skip_users, run the scripts
# only run if:
# 1. the user is NOT in $profile_user_environment::quota::skip_users, AND
# 2. the user hasn't switched identity
whoami | egrep -q '^(<%= join($profile_user_environment::quota::skip_users, "|") %>)$'
if [[ $? != 0 ]]; then
if [[ $? != 0 && $USER == `logname` ]]; then

# run quota scripts
echo
Expand Down

0 comments on commit 4b9387d

Please sign in to comment.