Bug 426809 - lock check is backwards in apt cron.daily job
lock check is backwards in apt cron.daily job
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: apt (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Axel Thimm
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-26 13:24 EST by Adrian Hands
Modified: 2008-01-02 05:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-02 05:00:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adrian Hands 2007-12-26 13:24:53 EST
Description of problem:

The script /etc/cron.daily/apt.cron from the Fedora apt package (fc8) starts off
with:

Quote:
  #!/bin/sh
  
  [ ! -f /var/lock/subsys/apt ] && exit 0
...

Meaning if the lock file does NOT exist, exit (success) without doing anything.
The lock file does not exist, so the cron job never does anything.
Isn't this backwards--i.e. shouldn't it exit if the file DOES exist (meaning apt
is already running)?



Version-Release number of selected component (if applicable):

apt-0.5.15lorg3.93-4.fc8


How reproducible:


Steps to Reproduce:

n/a
  
Actual results:

no daily upgrades

Expected results:

daily upgrades

Additional info:
Comment 1 Panu Matilainen 2008-01-02 05:00:35 EST
This is very much intentional and not a bug: the lockfile existence is
controlled by apt "service", automatic upgrades should not be done unless
explicitly enabled:
# chkconfig apt on
# service apt start

..and you'll get your daily upgrades.

Note You need to log in before you can comment on or make changes to this bug.