* [gentoo-commits] gentoo-x86 commit in sys-apps/mlocate/files: mlocate.cron-r2
@ 2009-11-18 10:29 Christian Faulhammer (fauli)
0 siblings, 0 replies; 3+ messages in thread
From: Christian Faulhammer (fauli) @ 2009-11-18 10:29 UTC (permalink / raw
To: gentoo-commits
fauli 09/11/18 10:29:14
Added: mlocate.cron-r2
Log:
remove Bashisms from cron file, thanks to Richard Li <admin AT chys DOT info> in bug 293459
(Portage version: 2.1.6.13/cvs/Linux i686)
Revision Changes Path
1.1 sys-apps/mlocate/files/mlocate.cron-r2
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?rev=1.1&content-type=text/plain
Index: mlocate.cron-r2
===================================================================
#! /bin/sh
if [ -x /usr/bin/updatedb ]
then
if [ -f /etc/updatedb.conf ]
then
args=""
else
args="-f proc"
fi
if [ -f /etc/mlocate-cron.conf ]
then
. /etc/mlocate-cron.conf
fi
# run on active process in case ionice isnt installed, or
# system is really old and ionice doesnt work ...
ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} -p $$ 2>/dev/null
nice -n ${NICE:-10} /usr/bin/updatedb ${args}
fi
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/mlocate/files: mlocate.cron-r2
@ 2011-01-30 13:16 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 3+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-01-30 13:16 UTC (permalink / raw
To: gentoo-commits
scarabeus 11/01/30 13:16:50
Modified: mlocate.cron-r2
Log:
Revision bump with perserved stable keywords. Fix typo in cronfile that prevented cronjob to operate per bug #353122. Drop older affected version to ensure everyone upgrade.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64, RepoMan options: --force)
Revision Changes Path
1.3 sys-apps/mlocate/files/mlocate.cron-r2
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?r1=1.2&r2=1.3
Index: mlocate.cron-r2
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mlocate.cron-r2 24 Jan 2011 12:39:33 -0000 1.2
+++ mlocate.cron-r2 30 Jan 2011 13:16:50 -0000 1.3
@@ -35,6 +35,7 @@
# alter the priority of the updatedb process
if [ -x /usr/bin/renice ]; then
/usr/bin/renice +${NICE:-19} -p $$ > /dev/null 2>&1
+fi
if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then
/usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1
fi
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/mlocate/files: mlocate.cron-r2
@ 2011-01-31 13:17 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 3+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-01-31 13:17 UTC (permalink / raw
To: gentoo-commits
scarabeus 11/01/31 13:17:10
Modified: mlocate.cron-r2
Log:
Fix premature removing of the lock file and parse the args more sanely when there is no config around. This fixes bug #353270.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
Revision Changes Path
1.4 sys-apps/mlocate/files/mlocate.cron-r2
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2?r1=1.3&r2=1.4
Index: mlocate.cron-r2
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/mlocate/files/mlocate.cron-r2,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mlocate.cron-r2 30 Jan 2011 13:16:50 -0000 1.3
+++ mlocate.cron-r2 31 Jan 2011 13:17:10 -0000 1.4
@@ -12,13 +12,13 @@
# check if we are already running (lockfile)
LOCKFILE="/var/lock/mlocate.daily.lock"
-trap "rm -f ${LOCKFILE}" EXIT
if [ -e "${LOCKFILE}" ]; then
echo >&2 "Warning: \"${LOCKFILE}\" already present, not running updatedb."
exit 1
-else
- touch "${LOCKFILE}"
fi
+touch "${LOCKFILE}"
+# trap the lockfile only if we really run the updatedb
+trap "rm -f ${LOCKFILE}" EXIT
# source the user specified variables
if [ -f /etc/mlocate-cron.conf ]; then
@@ -26,10 +26,9 @@
fi
# check the config file
-ARGS=""
+NODEVS=""
if [ ! -f /etc/updatedb.conf ]; then
- nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
- ARGS="-f ${nodevs}"
+ NODEVS=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
fi
# alter the priority of the updatedb process
@@ -42,7 +41,7 @@
# run the updatedb if possible
if [ -x /usr/bin/updatedb ]; then
- /usr/bin/updatedb ${ARGS}
+ /usr/bin/updatedb -f "${NODEVS}"
else
echo >&2 "Warning: \"/usr/bin/updatedb\" is not executable, unable to run updatedb."
exit 0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-31 13:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-30 13:16 [gentoo-commits] gentoo-x86 commit in sys-apps/mlocate/files: mlocate.cron-r2 Tomas Chvatal (scarabeus)
-- strict thread matches above, loose matches on Subject: below --
2011-01-31 13:17 Tomas Chvatal (scarabeus)
2009-11-18 10:29 Christian Faulhammer (fauli)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox