Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jakerundall committed Dec 7, 2023
1 parent cf82b32 commit 9939094
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
11 changes: 7 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The following parameters are available in the `profile_user_environment::quota`
* [`command_paths`](#-profile_user_environment--quota--command_paths)
* [`file_prefix`](#-profile_user_environment--quota--file_prefix)
* [`skip_users`](#-profile_user_environment--quota--skip_users)
* [`timeout_interval`](#-profile_user_environment--quota--timeout_interval)
* [`timeout_interval_seconds`](#-profile_user_environment--quota--timeout_interval_seconds)

##### <a name="-profile_user_environment--quota--command_paths"></a>`command_paths`

Expand All @@ -92,19 +92,22 @@ Data type: `String`

Run-script files will be added for various shells in /etc/profile.d/
to wrap the quota scripts. This parameter specifies the prefix for
these run-scripts. Will be applied as ${file_prefix}_quota.[extension].
the filenames of these run-scripts. The entire name will end up being
${file_prefix}_quota.[extension]. A prefix is useful to avoid collisions
and control the order of execution in relation to other scripts in
/etc/profile.d/.

##### <a name="-profile_user_environment--quota--skip_users"></a>`skip_users`

Data type: `Array`

When these users log in quota commands will NOT be run.

##### <a name="-profile_user_environment--quota--timeout_interval"></a>`timeout_interval`
##### <a name="-profile_user_environment--quota--timeout_interval_seconds"></a>`timeout_interval_seconds`

Data type: `Integer`

Quota commands are wrapped in 'timeout' and will be aborted after
Each quota command is wrapped in 'timeout' and will be aborted after
this number of seconds. Can be useful to prevent long "hangs" at
login if there are filesystem problems.

Expand Down
11 changes: 7 additions & 4 deletions manifests/quota.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
# @param file_prefix
# Run-script files will be added for various shells in /etc/profile.d/
# to wrap the quota scripts. This parameter specifies the prefix for
# these run-scripts. Will be applied as ${file_prefix}_quota.[extension].
# the filenames of these run-scripts. The entire name will end up being
# ${file_prefix}_quota.[extension]. A prefix is useful to avoid collisions
# and control the order of execution in relation to other scripts in
# /etc/profile.d/.
#
# @param skip_users
# When these users log in quota commands will NOT be run.
#
# @param timeout_interval
# Quota commands are wrapped in 'timeout' and will be aborted after
# @param timeout_interval_seconds
# Each quota command is wrapped in 'timeout' and will be aborted after
# this number of seconds. Can be useful to prevent long "hangs" at
# login if there are filesystem problems.
#
Expand All @@ -26,7 +29,7 @@
Array $command_paths,
String $file_prefix,
Array $skip_users,
Integer $timeout_interval,
Integer $timeout_interval_seconds,
) {
# defaults for file resources
File {
Expand Down
2 changes: 1 addition & 1 deletion templates/quota.csh.epp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if ( $? != 0 && $USER == `logname` ) then
# run quota scripts
echo ""
<% $profile_user_environment::quota::command_paths.each |$path| { -%>
timeout <%= $profile_user_environment::quota::timeout_interval %> <%= $path %>
timeout <%= $profile_user_environment::quota::timeout_interval_seconds %> <%= $path %>
echo ""
<% } -%>

Expand Down
2 changes: 1 addition & 1 deletion templates/quota.sh.epp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ $? != 0 && $USER == `logname` ]]; then
# run quota scripts
echo
<% $profile_user_environment::quota::command_paths.each |$path| { -%>
timeout <%= $profile_user_environment::quota::timeout_interval %> <%= $path %>
timeout <%= $profile_user_environment::quota::timeout_interval_seconds %> <%= $path %>
echo
<% } -%>

Expand Down

0 comments on commit 9939094

Please sign in to comment.