From 271e7d66a07c90d8b2501dae3309afec7bc1d62a Mon Sep 17 00:00:00 2001 From: mhoellein Date: Mon, 23 Aug 2021 09:54:05 +0200 Subject: [PATCH] committing changes in /etc after apt run Package changes: +quota 4.04-2ubuntu0.1 amd64 --- .etckeeper | 7 +++++++ cron.daily/quota | 17 +++++++++++++++ default/quota | 5 +++++ init.d/quota | 53 +++++++++++++++++++++++++++++++++++++++++++++++ init.d/quotarpc | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ quotagrpadmins | 8 +++++++ quotatab | 18 ++++++++++++++++ warnquota.conf | 13 ++++++++++++ 8 files changed, 175 insertions(+) create mode 100755 cron.daily/quota create mode 100644 default/quota create mode 100755 init.d/quota create mode 100755 init.d/quotarpc create mode 100644 quotagrpadmins create mode 100644 quotatab create mode 100644 warnquota.conf diff --git a/.etckeeper b/.etckeeper index fd3dcea8..299eb0fa 100755 --- a/.etckeeper +++ b/.etckeeper @@ -2030,6 +2030,7 @@ maybe chmod 0755 'cron.daily/man-db' maybe chmod 0755 'cron.daily/mlocate' maybe chmod 0755 'cron.daily/ntp' maybe chmod 0755 'cron.daily/passwd' +maybe chmod 0755 'cron.daily/quota' maybe chmod 0755 'cron.daily/samba' maybe chmod 0755 'cron.daily/spamassassin' maybe chmod 0755 'cron.daily/update-notifier-common' @@ -2190,6 +2191,7 @@ maybe chmod 0644 'default/ntpdate' maybe chmod 0644 'default/openbsd-inetd' maybe chmod 0644 'default/openvpn' maybe chmod 0644 'default/proftpd' +maybe chmod 0644 'default/quota' maybe chmod 0644 'default/rcS' maybe chmod 0644 'default/redis-server' maybe chmod 0644 'default/rsync' @@ -2995,6 +2997,8 @@ maybe chmod 0755 'init.d/pppd-dns' maybe chmod 0755 'init.d/privoxy' maybe chmod 0755 'init.d/procps' maybe chmod 0755 'init.d/proftpd' +maybe chmod 0755 'init.d/quota' +maybe chmod 0755 'init.d/quotarpc' maybe chmod 0755 'init.d/rc' maybe chmod 0755 'init.d/rc.local' maybe chmod 0755 'init.d/rcS' @@ -10420,6 +10424,8 @@ maybe chmod 0644 'python3.5/sitecustomize.py' maybe chmod 0755 'python3.6' maybe chmod 0644 'python3.6/sitecustomize.py' maybe chmod 0644 'python3/debian_config' +maybe chmod 0644 'quotagrpadmins' +maybe chmod 0644 'quotatab' maybe chmod 0755 'radcli' maybe chmod 0644 'radcli/dictionary' maybe chmod 0644 'radcli/dictionary.ascend' @@ -10962,6 +10968,7 @@ maybe chmod 0755 'vnc/xstartup' maybe chmod 0755 'w3m' maybe chmod 0644 'w3m/config' maybe chmod 0644 'w3m/mailcap' +maybe chmod 0644 'warnquota.conf' maybe chmod 0644 'wgetrc' maybe chmod 0755 'wildmidi' maybe chmod 0644 'wildmidi/wildmidi.cfg' diff --git a/cron.daily/quota b/cron.daily/quota new file mode 100755 index 00000000..948c8289 --- /dev/null +++ b/cron.daily/quota @@ -0,0 +1,17 @@ +#! /bin/sh + +# check if quota package is available +test -x /usr/sbin/warnquota || exit 0 + +# check if warnquota run is configured +test -f /etc/default/quota || exit 0 +. /etc/default/quota + +if [ "$run_warnquota" = "true" ]; then + # check if quotas are enabled + if grep -q '^[^#]*quota' /etc/fstab; then + /usr/sbin/warnquota -ug + fi +fi + +exit 0 diff --git a/default/quota b/default/quota new file mode 100644 index 00000000..fd3df151 --- /dev/null +++ b/default/quota @@ -0,0 +1,5 @@ +# Set to "true" if warnquota should be run in cron.daily +run_warnquota= + +# Add options to rpc.rquotad here +RPCRQUOTADOPTS= diff --git a/init.d/quota b/init.d/quota new file mode 100755 index 00000000..d8c08032 --- /dev/null +++ b/init.d/quota @@ -0,0 +1,53 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: quota +# Short-Description: Enable user quota +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="quota service" + +# names of binaries +on=/sbin/quotaon + +set -e + +. /lib/lsb/init-functions + +case "$1" in + start) + /usr/share/quota/quotaon.sh + ;; + stop) + /usr/share/quota/quotaoff.sh + ;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + $0 stop + $0 start + ;; + status) + if LC_MESSAGES=C $on -ap | grep -q "is on"; then + log_success_msg "quota is on" + exit 0 + else + log_failure_msg "quota is off" + exit 3 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/init.d/quotarpc b/init.d/quotarpc new file mode 100755 index 00000000..4dc768f0 --- /dev/null +++ b/init.d/quotarpc @@ -0,0 +1,54 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: quotarpc +# Short-Description: Starts rpc process for remote quota handling +# Required-Start: $remote_fs $syslog quota +# Required-Stop: $remote_fs $syslog quota +# Should-Start: $portmap rpcbind +# Should-Stop: $portmap rpcbind +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=rpc.rquotad +DESC="quota service" + +# names of binaries +DAEMON=/usr/sbin/rpc.rquotad + +test -f $DAEMON || exit 0 + +. /lib/lsb/init-functions + +set -e + +case "$1" in + start) + /usr/share/quota/quotarpc.sh + ;; + stop) + log_daemon_msg "Stopping $DESC" "rpc.rquotad" + start-stop-daemon --stop --quiet --oknodo --exec $DAEMON + log_end_msg $? + ;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + $0 stop + $0 start + ;; + status) + status_of_proc $DAEMON quotarpc + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/quotagrpadmins b/quotagrpadmins new file mode 100644 index 00000000..a1f2f462 --- /dev/null +++ b/quotagrpadmins @@ -0,0 +1,8 @@ +# +# This is a sample groupadmins file (/etc/quotagrpadmins) +# +# Comments begin with hash in the beginning of the line + +# In this file you specify users responsible for space used by the group +users: root +mygroup: chief diff --git a/quotatab b/quotatab new file mode 100644 index 00000000..6ab6ebdf --- /dev/null +++ b/quotatab @@ -0,0 +1,18 @@ +# This is an example quotatab file +# +# This file is used as a translation for device names, so a warnquota message +# makes sense to the user. +# +# syntax is as follows: +# +# colon ':' is used to specify the start of the substituted text +# pipe '|' is used to specify a line break +# +# device:substituted text +# device:text on line 1|test on line2 +# +# For instance if you would like to have warnquota tell the user their +# 'mailspool' is full instead of '/dev/hdb1' is full, use the following +# example. +# +# /dev/hdb1:mailspool diff --git a/warnquota.conf b/warnquota.conf new file mode 100644 index 00000000..fdaf37a7 --- /dev/null +++ b/warnquota.conf @@ -0,0 +1,13 @@ +; ; and # type comments are allowed +# and even blank lines + +# values can be quoted: +MAIL_CMD = "/usr/sbin/sendmail -t" +FROM = "root@localhost" +# but they don't have to be: +SUBJECT = Over quota +CC_TO = "root@localhost" +SUPPORT = "root@localhost" +PHONE = "" +# +CHARSET = UTF-8 -- 2.43.0