DAEMON_OPTS are not recognized

Bug #915218 reported by Thomas Fahle
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
haveged (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

DAEMON_OPTS in /etc/haveged are not recognized due to '--' in /etc/init.d/haveged

man bash: "A -- signals the end of options and disables further option processing. "

I wanted to set the write_wakeup_threshold to 1024 bits in /etc/default/haveged,
e.g. DAEMON_OPTS="-w 1024"

This should modify /proc/sys/kernel/random/write_wakeup_threshold, but it doesn't.

diff --git a/init.d/haveged b/init.d/haveged

index 9e77653..a5a9dcb 100755
--- a/init.d/haveged
+++ b/init.d/haveged
@@ -126,13 +126,13 @@ running() {
 start_server() {
 # Start the process using the wrapper
         if [ -z "$DAEMONUSER" ] ; then
- start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
+ start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS
             errcode=$?
         else
 # if we are using a daemonuser then change the user id
             start-stop-daemon --start --quiet --pidfile $PIDFILE \
                         --chuid $DAEMONUSER \
- --exec $DAEMON -- $DAEMON_OPTS
+ --exec $DAEMON $DAEMON_OPTS
             errcode=$?
         fi
        return $errcode

In addition I'd like to set a sane default in /etc/default/haveged

diff --git a/default/haveged b/default/haveged

index 308f547..9e972e3 100644
--- a/default/haveged
+++ b/default/haveged
@@ -7,4 +7,6 @@
 #

 # Additional options that are passed to the Daemon.
-DAEMON_OPTS=""
+# -w Set write_wakeup_threshold to 1024 bits
+# -v Set output level 0=minimal,1=config/fill items
+DAEMON_OPTS="-w 1024 -v1"

lsb_release -rd
Description: Ubuntu 10.04.3 LTS
Release: 10.04

apt-cache policy haveged

haveged:
  Installed: 0.9-1
  Candidate: 0.9-1
  Version table:
 *** 0.9-1 0
        500 http://mirror.hetzner.de/ubuntu/packages/ lucid/universe Packages
        500 http://de.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

Revision history for this message
Dan Streetman (ddstreet) wrote :

oops sorry, i edited the wrong bug :-/

Changed in haveged (Ubuntu Groovy):
assignee: nobody → Dan Streetman (ddstreet)
status: New → In Progress
importance: Undecided → Low
assignee: Dan Streetman (ddstreet) → nobody
importance: Low → Undecided
status: In Progress → New
no longer affects: haveged (Ubuntu Groovy)
Revision history for this message
Dan Streetman (ddstreet) wrote :

haveged systemd service does correctly apply any DAEMON_OPTS, so I'm closing this really old bug.

Changed in haveged (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.