~ubuntu-branches/ubuntu/gutsy/slocate/gutsy

« back to all changes in this revision

Viewing changes to debian/cron.daily

  • Committer: Bazaar Package Importer
  • Author(s): dAniel hAhler
  • Date: 2007-09-26 02:31:46 UTC
  • Revision ID: james.westby@ubuntu.com-20070926023146-ylflo81qstf01v5c
Tags: 3.1-1ubuntu2
debian/cron.daily: Use ionice. It looks for settings from
/etc/updatedb.conf and uses "best effort" class by default.
Quite the same for "nice", defaulting to "10".
(LP: #134692)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
then
5
5
        if [ -f /etc/updatedb.conf ]
6
6
        then
7
 
                /usr/bin/updatedb
 
7
                . /etc/updatedb.conf
 
8
        fi
 
9
 
 
10
        # Adjust I/O priority of current process (default: best effort)
 
11
        ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} -p $$
 
12
 
 
13
        if [ -f /etc/updatedb.conf ]
 
14
        then
 
15
                nice -n {$NICE:-10} /usr/bin/updatedb
8
16
        else
9
 
                /usr/bin/updatedb -f proc
 
17
                nice -n {$NICE:-10} /usr/bin/updatedb -f proc
10
18
        fi
11
19
        chown root.slocate /var/lib/slocate/slocate.db
12
20
fi