summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-08-20 03:25:34 +0100
committerSam James <sam@gentoo.org>2021-08-20 03:25:34 +0100
commit08df76446cf4f5092b6aa2f77c76cdabdf4baaba (patch)
tree54260a1e764a4809a3a98cd3e1ccfc3750dd7d32 /app-admin/tmpwatch
parentnet-print/gutenprint: restore eautoreconf for CFLAGS patch (diff)
downloadgentoo-08df76446cf4f5092b6aa2f77c76cdabdf4baaba.tar.gz
gentoo-08df76446cf4f5092b6aa2f77c76cdabdf4baaba.tar.bz2
gentoo-08df76446cf4f5092b6aa2f77c76cdabdf4baaba.zip
Revert "app-admin/tmpwatch: address bug 524698 (bashism)"
This reverts commit ce830c8d6fc7869fd559d36c71cf3b8af3b4fd80. Forgot to set git author when massaging git to apply the patch. Bug: https://bugs.gentoo.org/524698 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin/tmpwatch')
-rw-r--r--app-admin/tmpwatch/files/tmpwatch.cron40
-rw-r--r--app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild (renamed from app-admin/tmpwatch/tmpwatch-2.11-r3.ebuild)0
2 files changed, 21 insertions, 19 deletions
diff --git a/app-admin/tmpwatch/files/tmpwatch.cron b/app-admin/tmpwatch/files/tmpwatch.cron
index d35a590379d7..806b1453e552 100644
--- a/app-admin/tmpwatch/files/tmpwatch.cron
+++ b/app-admin/tmpwatch/files/tmpwatch.cron
@@ -1,45 +1,47 @@
#!/bin/sh
-
-PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+# vim: ft=sh
# This cron script contains several (commented out) examples. You may use
# them as is, by uncommenting them, or modify them to suit your needs. Read
# tmpwatch(8) for more information on tmpwatch parameters.
+### Variables ###
+
+TMPWATCH="/usr/sbin/tmpwatch"
+#PORTAGE_TMPDIR="$(portageq envvar PORTAGE_TMPDIR)/portage"
+#PORTAGE_LOGDIR="$(portageq envvar PORT_LOGDIR)"
+#DISTDIR="$(portageq distdir)"
+
### EXAMPLES ###
# NOTE: if you have noatime in /etc/fstab for any partitions you plan on
# running tmpwatch on, you should obviously change any of the examples that
# use atime (-u|--atime). Those that don't specify anything, default to
-# atime. Be aware that the time value is in HOURS!
+# atime.
+
+# NOTE2: the time value is in HOURS!
# Delete everything in /tmp that haven't been accessed in a week (>=168 hrs).
#
-# if [ -d /tmp ]; then
-# tmpwatch --atime 168 /tmp
+# if [[ -d /tmp ]]; then
+# ${TMPWATCH} --atime 168 /tmp
# fi
# Delete everything in PORTAGE_TMPDIR that hasn't been modified in 2 weeks.
#
-# if PORTAGE_TMPDIR=$(portageq envvar PORTAGE_TMPDIR) &&
-# [ -d "${PORTAGE_TMPDIR}/portage" ] &&
-# ! pgrep -x emerge >/dev/null
-# then
-# tmpwatch --mtime --all 336 "${PORTAGE_TMPDIR}/portage"
+# if [[ -d ${PORTAGE_TMPDIR:-/var/tmp/portage} && -z $(/usr/bin/pgrep emerge) ]]; then
+# ${TMPWATCH} --mtime --all 336 ${PORTAGE_TMPDIR:-/var/tmp/portage}
# fi
# Delete everything in DISTDIR that hasn't been accessed in 6 months (going
-# by 30 day months).
+# by 30 day months)
#
-# if DISTDIR=$(portageq distdir) && [ -d "${DISTDIR}" ]; then
-# tmpwatch --atime --fuser 4320 "${DISTDIR}"
+# if [[ -d ${DISTDIR:-/usr/portage/distfiles} ]]; then
+# ${TMPWATCH} --atime --fuser 4320 ${DISTDIR:-/usr/portage/distfiles}
# fi
-# Delete everything in PORTAGE_LOGDIR that hasn't been accessed in 4 weeks.
+# Delete everything in PORTAGE_LOGDIR that hasn't been accessed in 4 weeks
#
-# if { PORTAGE_LOGDIR=$(portageq envvar PORTAGE_LOGDIR) ||
-# PORTAGE_LOGDIR=$(portageq envvar PORT_LOGDIR); } &&
-# [ -d "${PORTAGE_LOGDIR}" ]
-# then
-# tmpwatch --atime 772 "${PORTAGE_LOGDIR}"
+# if [[ -d ${PORTAGE_LOGDIR:-/var/log/portage} ]]; then
+# ${TMPWATCH} --atime 772 ${PORTAGE_LOGDIR:-/var/log/portage}
# fi
diff --git a/app-admin/tmpwatch/tmpwatch-2.11-r3.ebuild b/app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild
index cdc308efa9f9..cdc308efa9f9 100644
--- a/app-admin/tmpwatch/tmpwatch-2.11-r3.ebuild
+++ b/app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild