init-checkconf returns seemingly random results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
While tracking down a problem related to upstart, I decided to check the syntax of all my upstart init files. I wrote this simple script:
for a in /etc/init/*; do init-checkconf $a; done 2>&1 | grep invalid
This script said that a number of files had syntax errors. When the file with the error is checked individually on the command line with init-checkconf, it shows no error.
Running the script again showed a different set of files with errors. Checking each file individually on the command line does not show an error.
Running it a third time gave yet another set of files with errors.
Why would this give different results each time it is run? Why does init-checkconf report seemingly random syntax errors when run in a script?
Rich
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: upstart 1.12.1-0ubuntu4.2
ProcVersionSign
Uname: Linux 3.13.0-32-generic x86_64
.etc.init.
.etc.init.
.etc.init.
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Dec 8 13:08:53 2014
ProcKernelCmdline: BOOT_IMAGE=
SourcePackage: upstart
UpgradeStatus: Upgraded to trusty on 2014-04-19 (233 days ago)
UpstartBugCategory: System
UpstartRunningS
UpstartRunningS
modified.
modified.
modified.
modified.
modified.
mtime.conffile.
mtime.conffile.
mtime.conffile.
mtime.conffile.
For example, here are two consecutive runs of the script showing different results:
root@ladastra: /etc/init# for a in /etc/init/*; do init-checkconf $a; done 2>&1 | grep invalid alsa-state. conf: syntax invalid: alsa-store. conf: syntax invalid: avahi-daemon. conf: syntax invalid: binfmt- support. conf: syntax invalid: bluetooth. conf: syntax invalid: cryptdisks. conf: syntax invalid: ecryptfs- utils-save. conf: syntax invalid: glusterfs- server. conf: syntax invalid: lightdm. conf: syntax invalid: mountall- shell.conf: syntax invalid: mountdevsubfs. sh.conf: syntax invalid: mountnfs. sh.conf: syntax invalid: nvidia- persistenced. conf: syntax invalid: qemu-kvm. conf: syntax invalid: reload- smbd.conf: syntax invalid: resolvconf. conf: syntax invalid: startpar- bridge. conf: syntax invalid: tty5.conf: syntax invalid: upstart- socket- bridge. conf: syntax invalid: ureadahead- other.conf: syntax invalid: whoopsie. conf: syntax invalid: /etc/init# for a in /etc/init/*; do init-checkconf $a; done 2>&1 | grep invalid console- font.conf: syntax invalid: failsafe. conf: syntax invalid: hwclock- save.conf: syntax invalid: mountall- bootclean. sh.conf: syntax invalid: mountall- net.conf: syntax invalid: mountall- reboot. conf: syntax invalid: mountall- shell.conf: syntax invalid: mounted- run.conf: syntax invalid: passwd. conf: syntax invalid: plymouth. conf: syntax invalid: plymouth- splash. conf: syntax invalid: rfkill- store.conf: syntax invalid: statd-mounting. conf: syntax invalid: systemd- logind. conf: syntax invalid: tty1.conf: syntax invalid:
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
root@ladastra:
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
ERROR: File /etc/init/
Then if I run the check on the single file tty1.conf, which returned a syntax error on the scripted run, it returns no error:
root@ladastra: /etc/init# init-checkconf /etc/init/tty1.conf tty1.conf: syntax ok
File /etc/init/