Forum Replies Created
-
AuthorPosts
-
trubicoid
Membernot sure what you mean, because the problem is that I can’t run rngd with start-stop-daemon, so the first command is not useful
let’s try to bind it to another cgroup started by openrc, I’ve chosen metalog and everything works:
echo $$ > /sys/fs/cgroup/openrc/metalog/tasks # cat /proc/self/cgroup 7:blkio:/ 6:freezer:/ 5:devices:/ 4:cpuacct:/ 3:cpu:/ 2:cpuset:/ 1:name=openrc:/metalog ls -l /dev/ttyACM0; dd iflag=fullblock if=/dev/ttyACM0 bs=64 count=1 | od crw-rw---- 1 root uucp 166, 0 Sep 6 01:46 /dev/ttyACM0 0000000 027221 177664 037012 170766 104447 105175 105241 011203 0000020 005052 163532 120074 006217 016672 010742 160602 037067 0000040 004256 003130 027505 047334 171510 126767 056415 015250 0000060 026661 157325 104115 065264 153776 150571 014457 063023 0000100 1+0 records in 1+0 records out 64 bytes (64 B) copied, 0.0211215 s, 3.0 kB/s
and
# find /sys/fs/cgroup -name devices.list -ls -exec cat '{}' \; 18 0 -r--r--r-- 1 root root 0 Sep 12 17:53 /sys/fs/cgroup/devices/openrc_rngd/devices.list a *:* rwm 10 0 -r--r--r-- 1 root root 0 Sep 12 17:53 /sys/fs/cgroup/devices/devices.list a *:* rwm
where the rngd permissions come from your first solution
I can also disable rc_controller_cgroups=”NO” in /etc/rc.conf, but nothing changes.
I can even rebuild kernel without cgroups, but I believe the problem is not related to cgroups. It is in the way start-stop-daemon handels tty line parameters.trubicoid
MemberI think it is not a problem of accessing the device. I tried your fix and it does not help.
The problem is with
start-stop-daemon --start --exec /usr/sbin/rngd --pidfile /var/run/rngd.pid --wait 1000 -- --pid-file /var/run/rngd.pid --foreground --random-step 64 --fill-watermark 2048 --rng-device /dev/hwrng
While manually without start-stop-daemon it works
/usr/sbin/rngd --pid-file /var/run/rngd.pid --foreground --random-step 64 --fill-watermark 2048 --rng-device /dev/hwrng
The –foreground may be changed for –background.
Looks like start-stop-daemon sees in the arguments a tty device and automagically connects the process to that tty instead of leaving it unconnected.
Then no data from ttyACM0 go to rngd and it complains and stops
what version on openrc do you have on centos? mine is 0.12.4
BTW the forum is back again.
trubicoid
MemberMine is 1.02, what does it mean?
lsusb -v -d 04d8:f5fe | grep bcdDevice bcdDevice 1.02
-
AuthorPosts