|
|
30c500 |
From 67a0dbf6434552e720b0d311597553b3a76f779e Mon Sep 17 00:00:00 2001
|
|
|
30c500 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
30c500 |
Date: Tue, 23 Aug 2011 13:45:15 +0200
|
|
|
30c500 |
Subject: [PATCH] warnquota configuration tunes
|
|
|
30c500 |
MIME-Version: 1.0
|
|
|
30c500 |
Content-Type: text/plain; charset=UTF-8
|
|
|
30c500 |
Content-Transfer-Encoding: 8bit
|
|
|
30c500 |
|
|
|
30c500 |
Rest of changes (378a64006bb1e818e84a1c77808563b802b028fa) not
|
|
|
30c500 |
accepted by upstream (we had root@... addresses and more enterprise
|
|
|
30c500 |
wordings usually there).
|
|
|
30c500 |
|
|
|
30c500 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
30c500 |
---
|
|
|
30c500 |
warnquota.c | 2 +-
|
|
|
30c500 |
warnquota.conf | 17 ++++++++---------
|
|
|
30c500 |
2 files changed, 9 insertions(+), 10 deletions(-)
|
|
|
30c500 |
|
|
|
30c500 |
diff --git a/warnquota.c b/warnquota.c
|
|
|
30c500 |
index 0d911e4..2c8e084 100644
|
|
|
30c500 |
--- a/warnquota.c
|
|
|
30c500 |
+++ b/warnquota.c
|
|
|
30c500 |
@@ -837,7 +837,7 @@ cc_parse_err:
|
|
|
30c500 |
}
|
|
|
30c500 |
#ifdef USE_LDAP_MAIL_LOOKUP
|
|
|
30c500 |
else if (!strcmp(var, "LDAP_MAIL")) {
|
|
|
30c500 |
- if(strcasecmp(value, "true") == 0)
|
|
|
30c500 |
+ if(strncasecmp(value, "true", 4) == 0)
|
|
|
30c500 |
config->use_ldap_mail = 1;
|
|
|
30c500 |
else
|
|
|
30c500 |
config->use_ldap_mail = 0;
|
|
|
30c500 |
diff --git a/warnquota.conf b/warnquota.conf
|
|
|
30c500 |
index b06f81f..7e00947 100644
|
|
|
30c500 |
--- a/warnquota.conf
|
|
|
30c500 |
+++ b/warnquota.conf
|
|
|
30c500 |
@@ -4,17 +4,16 @@
|
|
|
30c500 |
# and even blank lines
|
|
|
30c500 |
|
|
|
30c500 |
# values can be quoted:
|
|
|
30c500 |
-#MAIL_CMD = "/usr/my/sendmail/instead/sendmail -t"
|
|
|
30c500 |
-MAIL_CMD = "/bin/echo"
|
|
|
30c500 |
-FROM = "bas@example.com"
|
|
|
30c500 |
+MAIL_CMD = "/usr/sbin/sendmail -t"
|
|
|
30c500 |
+FROM = "root@example.com"
|
|
|
30c500 |
# but they don't have to be:
|
|
|
30c500 |
-SUBJECT = Hey, user, clean up your account!
|
|
|
30c500 |
-CC_TO = "sysadm@example.com"
|
|
|
30c500 |
+SUBJECT = NOTE: You are exceeding your allocated disk space limits
|
|
|
30c500 |
+CC_TO = "root@example.com"
|
|
|
30c500 |
# If you set this variable CC will be used only when user has less than
|
|
|
30c500 |
# specified grace time left (examples of possible times: 5 seconds, 1 minute,
|
|
|
30c500 |
# 12 hours, 5 days)
|
|
|
30c500 |
# CC_BEFORE = 2 days
|
|
|
30c500 |
-SUPPORT = "support@example.com"
|
|
|
30c500 |
+SUPPORT = "root@example.com"
|
|
|
30c500 |
PHONE = "(123) 456-1111 or (222) 333-4444"
|
|
|
30c500 |
# Text in the beginning of the mail (if not specified, default text is used)
|
|
|
30c500 |
# This way text can be split to more lines
|
|
|
30c500 |
@@ -22,11 +21,11 @@ PHONE = "(123) 456-1111 or (222) 333-4444"
|
|
|
30c500 |
# The expressions %i, %h, %d, and %% are substituted for user/group name,
|
|
|
30c500 |
# host name, domain name, and '%' respectively. For backward compatibility
|
|
|
30c500 |
# %s behaves as %i but is deprecated.
|
|
|
30c500 |
-MESSAGE = Hello user %i, I've noticed you use too much space\
|
|
|
30c500 |
- on my disk in %h.%d.|Delete your files on the following filesystems:|
|
|
|
30c500 |
+MESSAGE = Your disk usage has exceeded the agreed limits\
|
|
|
30c500 |
+ on this server|Please delete any unnecessary files on following filesystems:|
|
|
|
30c500 |
# Text in the end of the mail (if not specified, default text using SUPPORT and PHONE
|
|
|
30c500 |
# is created)
|
|
|
30c500 |
-SIGNATURE = See you!| Your admin of %h|
|
|
|
30c500 |
+SIGNATURE = root@example.com
|
|
|
30c500 |
# Following text is used for mails about group exceeding quotas
|
|
|
30c500 |
GROUP_MESSAGE = Hello,|\
|
|
|
30c500 |
your group %i is using too much disk space at %h.|\
|
|
|
30c500 |
--
|
|
|
30c500 |
2.13.5
|
|
|
30c500 |
|