Problems with /etc/init.d/* (netbase, portmap)
Hi all,
I noticed that many if not most of the files in /etc/init.d contain the
following expression:
test -f /sbin/klogd || exit 0
I would recommend this above line be changed to:
test -x /sbin/klogd || exit 0
The reasoning is pretty simple: if the file is not executable, the
script shouldn't try to run it. I first noticed this with the
portmapper. I don't want the portmapper to run on my box - there's no
need and I'd rather the portmapper not spew out information to whoever
asks. Likewise, I don't want to run it and tell it not to give out any
information - I simply don't want it run. Doing a chmod -x on it should
work but instead it produces an error. I would like to remove it but a)
it's in netbase, which is required, and b) removing the file will leave
cruft and reinstall when I upgrade.
Of course, an upgrade will chmod +x the file so I'm still pretty much
SOL, but I noticed that this problem is quite widespread among these
files (I have 48 with test -f; 18 with test -x) and should be a simple
fix.
regards,
Christopher
Reply to: