The current /etc/init.d/dictd file,
/var/cvsroot/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd,v 1.3 2008/11/08 18:36:21 pva Exp $
rewrites the /etc/dictd.conf file on every boot even if there's been no change
in the dictionarie in use. Attached is a script which rewrites only as necessary,
so that the dictd.conf file date doesn't keep changing. If the dictd package
is ever updated it might be worth using this script; it requires bash, not sh,
but so do a number of the init.d scripts.
Created attachment 242623 [details]
Revised /etc/init.d/dictd script
Nice job! Unfortunately init scripts that require bash are buggy and should be rewritten to avoid bash. If you know such init scripts, please, open separate bugs.
Now if you manage to fix dictd init scripts without bash, please, attach diff here and I'll happily apply it :)
BTW, also could you use $() instead of ``? This form is proffered as:
and it's in posix:
I'll close bug until better times as current behavior works for me and does not violate our requirement for init scripts to be sh compatible.
If you want to find bash init scripts, just run "grep bash" in /etc/init.d
I won't be rewriting the script, since it works for me, and I don't regard
bash, which is my standard shell, as buggy.
(In reply to comment #3)
> If you want to find bash init scripts, just run "grep bash" in /etc/init.d
Just did that: 0 scripts use bash on my system. I guess you are using stable baselayout-1 that use bash. But baselayout-1 will be replaced with openrc and openrc should work even on systems without bash. Thus init scrips other then from baselayout-1 package should never use bash.
> I won't be rewriting the script, since it works for me, and I don't regard
> bash, which is my standard shell, as buggy.
I never told that bash is buggy. But there is distribution standard that prohibit bash usage inside init scripts and thus I'm not allowed (and I do not want) to commit this init script into the tree.
I think I'd be more impressed by your arguments if your
current script was Posix compliant, without bashisms.
Anyhow, I rewrote the change to allow the script to run
under Posix , but it made for a pretty messy solution.
On the whole, I think I'll stick with bash.
If you have anything constructive to add, please, do. If your are going to whine - go to your mother and shut up here, please.