<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3518</bug_id>
          
          <creation_ts>2012-11-30 09:42:44 +0000</creation_ts>
          <short_desc>/etc/init.d/urandom service fails to start and stop</short_desc>
          <delta_ts>2013-02-27 11:07:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ming Liu">ming.liu</reporter>
          <assigned_to name="Ming Liu">ming.liu</assigned_to>
          <cc>corneliux.stoicescu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>song.liu</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27847</commentid>
    <comment_count>0</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-11-30 09:42:44 +0000</bug_when>
    <thetext>Build a core-image-minimal, deploy it in qemu, failed information as follow:

$ /etc/init.d/urandom start
urandom start: failed.
$ /etc/init.d/urandom stop
urandom stop: failed.

This issue arises because &quot;/etc/init.d/urandom&quot; script wanna save random-seed into /var/lib/urandom folder which does not exist in the file system.

There are two ways fixing it:
1) use a available directory instead of /var/lib/urandom, like:
   /var/lib/misc (as SUSE does)
   /var/lib (as Redhat/Fedora does)

2) add /var/lib/urandom into initscript meta&apos;s exported list. (similar to Ubuntu)

I personally prefer to method 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27892</commentid>
    <comment_count>1</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2012-12-03 11:46:15 +0000</bug_when>
    <thetext>Can you please specify the branch/commit on which you tested this on? Thank you :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27918</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-12-03 22:14:06 +0000</bug_when>
    <thetext>As was mentioned in an email reply to this, it could also be added to the initscripts populate-volatile, I think that keeping it in /var/lib/urandom more closely matches the /usr/lib/&lt;package&gt; approach.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27932</commentid>
    <comment_count>3</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-12-04 01:44:58 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Can you please specify the branch/commit on which you tested this on? Thank
&gt; you :)

I tested it on commit 99f003356be43bb361634359a5d3c520f72f0a08 of master. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27934</commentid>
    <comment_count>4</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2012-12-04 05:14:17 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; As was mentioned in an email reply to this, it could also be added to the
&gt; initscripts populate-volatile, I think that keeping it in /var/lib/urandom
&gt; more closely matches the /usr/lib/&lt;package&gt; approach.

Yes, I am on board. It seems a more reasonable solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29381</commentid>
    <comment_count>5</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2013-01-31 08:51:38 +0000</bug_when>
    <thetext>Merged into master:
http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=42e37058e06c76c6782d5371d4a60d260f00fa20</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30116</commentid>
    <comment_count>6</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-26 12:21:45 +0000</bug_when>
    <thetext>Tested in master:7d22ef28e64de06b6238d0ef9b664c0bee6efa46

/etc/init.d/urandom does not work:

root@jasperforest:~# /etc/init.d/urandom
root@jasperforest:~# /etc/init.d/urandom start
root@jasperforest:~# ps aux | grep urandom
root       813  0.0  0.0   4432   616 pts/0    S+   08:19   0:00 grep urandom
root@jasperforest:~# /etc/init.d/urandom start
root@jasperforest:~# /etc/init.d/urandom stop
root@jasperforest:~# /etc/init.d/urandom stop
root@jasperforest:~#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30157</commentid>
    <comment_count>7</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2013-02-27 01:49:44 +0000</bug_when>
    <thetext>hi, corneliux:

Do you mean there should be a daemon while /etc/init.d/urandom is started? But it&apos;s not supposed to be used like that, it&apos;s a single shot script, that attempting to get a random-seed from /dev/urandom when it&apos;s start/stop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30162</commentid>
    <comment_count>8</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-27 11:06:55 +0000</bug_when>
    <thetext>Hello Ming,

Indeed the script does not provide output. I tested urandom with the following scenario and it works:

cat /dev/urandom

I am sorry for my undocumented mistake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30163</commentid>
    <comment_count>9</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-27 11:07:50 +0000</bug_when>
    <thetext>Verified in master:7d22ef28e64de06b6238d0ef9b664c0bee6efa46</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>