deb package installer doesn't create /etc/init.d/logstash when it has been manually removed
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 63
Description
Tested with logstash_1.5.4-1_all.deb on Ubuntu Precise (12.04 LTS). Steps to repro:
Remove existent logstash with:
root@precise64:/var/lib/logrotate# apt-get remove logstash
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
logstash
0 upgraded, 0 newly installed, 1 to remove and 66 not upgraded.
After this operation, 143 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 62611 files and directories currently installed.)
Removing logstash ...
Processing triggers for ureadahead ...
Because it's a config file, /etc/init.d/logstash will not be removed:
root@precise64:/tmp# ls -al /etc/init.d/logstash
-rwxrwxr-x 1 root root 3963 Aug 20 20:21 /etc/init.d/logstash
Now remove /etc/init.d/logstash
root@precise64:/tmp# rm -f /etc/init.d/logstash
Install it again:
root@precise64:/tmp# dpkg -i ./logstash_1.5.4-1_all.deb
Selecting previously unselected package logstash.
(Reading database ... 51099 files and directories currently installed.)
Unpacking logstash (from ./logstash_1.5.4-1_all.deb) ...
Setting up logstash (1:1.5.4-1) ...
Processing triggers for ureadahead ...
We can see that /etc/init.d/logstash will not be installed:
root@precise64:/tmp# ls -al /etc/init.d/log*
ls: cannot access /etc/init.d/log*: No such file or directory
It seems that we are blindly following /var/lib/dpkg/info/logstash.list, even if a file doesn't exist. When we use "apt-get purge logstash", this file gets created again before doing a new installation. Perhaps this file should be declared as init and not config?
Contributor guide
Assessment
This issue has not been assessed yet.