This topic contains 1 reply, has 2 voices, and was last updated by  ubld.it 1 year, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1621

    Sylvain
    Member

    Hello,

    I received my TrueRNG one week ago, and it work fine!

    I just wanted to launch rngd when I plug the key, and not just at startup. Currently, rngd (both debian and centos versions) are just provided with SysVinit script, and I wanted to use systemd triggers. So I have done this (tested on Debian, with both rngd versions):

    1) /etc/systemd/system/dev-TrueRNG.device:

    [Unit]
    Description="/dev/TrueRNG who trigger rngd"
    Documentation="http://ubld.it/products/truerng-hardware-random-number-generator/"
    Requires=rngd.service

    2) /etc/systemd/system/rngd.service

    [Unit]
    Description="rngd triggered by /dev/TrueRNG"
    Documentation="man:rngd"
    
    [Service]
    EnvironmentFile=/etc/default/rng-tools
    ExecStart=/usr/sbin/rngd --foreground --rng-device=${HRNGDEVICE} --fill-watermark=90%

    Note: use /sbin/rngd on centos

    just reload by systemctl daemon-reload and enable if necessary, so now, rngd will start when TrueRNG is plugged, and stop when I remove it.

    It could be improve, but it work. Also notice, in /etc/default/rng-tools file, RNGDOPTIONS is multi-options, and systemd pass it as just one option, so rngd don’t start. You should create one variable per rndg’s option for it work, or simply add options on rngd.service

    Also notice on my Debian, rngd only start when I use –foreground, but some topics tell to use only –background for centos, so some tests are needed.

    best regards,

    #1634

    ubld.it
    Keymaster

    Thanks Sylvain!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.