-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2acaebc
commit d8a886d
Showing
2 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
# quota.csh: Managed by Puppet | ||
|
||
# if the user is in $profile_user_environment::quota::skip_users, exit | ||
# if the user is NOT in $profile_user_environment::quota::skip_users, run the scripts | ||
whoami | egrep -q '^(<%= join($profile_user_environment::quota::skip_users, "|") %>)$' | ||
if ( $? == 0 ) then | ||
exit 0 | ||
endif | ||
if ( $? != 0 ) then | ||
|
||
# run quota scripts | ||
echo "" | ||
# run quota scripts | ||
echo "" | ||
<% $profile_user_environment::quota::command_paths.each |$path| { -%> | ||
timeout <%= $profile_user_environment::quota::timeout_interval %> <%= $path %> | ||
echo "" | ||
timeout <%= $profile_user_environment::quota::timeout_interval %> <%= $path %> | ||
echo "" | ||
<% } -%> | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# quota.sh: Managed by Puppet | ||
|
||
USERNAME=`whoami` | ||
# if the user is NOT in $profile_user_environment::quota::skip_users, run the scripts | ||
whoami | egrep -q '^(<%= join($profile_user_environment::quota::skip_users, "|") %>)$' | ||
if [[ $? != 0 ]]; then | ||
|
||
# if the user is in $profile_user_environment::quota::skip_users, exit | ||
[[ "$USERNAME" =~ ^(<%= join($profile_user_environment::quota::skip_users, "|") %>)$ ]] && exit 0 | ||
|
||
# run quota scripts | ||
echo | ||
# run quota scripts | ||
echo | ||
<% $profile_user_environment::quota::command_paths.each |$path| { -%> | ||
timeout <%= $profile_user_environment::quota::timeout_interval %> <%= $path %> | ||
echo | ||
timeout <%= $profile_user_environment::quota::timeout_interval %> <%= $path %> | ||
echo | ||
<% } -%> | ||
|
||
fi | ||
|