init script fails to start unbound with /bin/sh=dash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unbound (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: unbound
It just said:
Setting up unbound (1.0.0-3) ...
* Starting recursive DNS server unbound invoke-rc.d: initscript unbound, action "start" failed.
dpkg: error processing unbound (--configure):
subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
unbound
E: Sub-process /usr/bin/dpkg returned an error code (1)
Trying manually:
[100 tv@musti ~]$ sudo sh -x /etc/init.d/unbound start
...
+ printf * Starting recursive DNS server unbound
* Starting recursive DNS server unbound + /usr/bin/expr 83 - 1
+ /usr/bin/tput hpa 82
+ already_running
+ return start-stop-daemon --start --pidfile /var/lib/
But it's not running:
[2 tv@musti ~]$ ps uaxw|grep unbound
tv 18362 0.0 0.0 8284 784 pts/0 R+ 17:20 0:00 grep unbound
Editing the init script and removing "return" from already_running made it work:
already_running() {
start-
--startas $DAEMON --test >/dev/null 2>&1
}
Posix shell stuff? My /bin/sh is dash
Checked, and behaved just like commented.
start-stop-daemon with --test option should return the righrt value:
-t, --test
value, but take no action.
Print actions that would be taken and set appropriate return
I'd accept the suggested modification as a patch.