diff --git a/manifests/quota.pp b/manifests/quota.pp index d197882..b84a6cb 100644 --- a/manifests/quota.pp +++ b/manifests/quota.pp @@ -12,16 +12,26 @@ ) { # defaults for file resources File { - ensure => file, group => 'root', mode => '0644', owner => 'root', } - # install run-script for Bash-like shells - file { "/etc/profile.d/${file_prefix}_quota.sh": - content => epp( 'profile_user_environment/quota.sh.epp' ), + if $command_paths.empty { + # no quota scripts to run, remove run-scripts + ## Bash-like shells + file { "/etc/profile.d/${file_prefix}_quota.sh": + ensure => absent, + } + ## csh-like shells + ## ... + } else { + # quota script(s) listed, manage run-scripts + ## Bash-like shells + file { "/etc/profile.d/${file_prefix}_quota.sh": + ensure => file, + content => epp( 'profile_user_environment/quota.sh.epp' ), + } + ## csh-like shells } - - # install run-script for csh-like shells }