public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 56726ed954bf1aa1f52214251eb42a7ab478e925
@ 2018-12-06 21:36 Arne Fitzenreiter
  0 siblings, 0 replies; only message in thread
From: Arne Fitzenreiter @ 2018-12-06 21:36 UTC (permalink / raw)
  To: ipfire-scm

[-- Attachment #1: Type: text/plain, Size: 3235 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  56726ed954bf1aa1f52214251eb42a7ab478e925 (commit)
      from  8d638b63f8bf08ee8869ed58734aabe96f8ffdc5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 56726ed954bf1aa1f52214251eb42a7ab478e925
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date:   Thu Dec 6 22:33:05 2018 +0100

    rngd: update initskript and add hwrngtty support
    
    Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/rootfiles/core/126/filelists/files |  2 ++
 config/udev/90-hwrng.rules                | 15 +++++++++++++++
 src/initscripts/system/rngd               | 12 +++++++++++-
 3 files changed, 28 insertions(+), 1 deletion(-)

Difference in files:
diff --git a/config/rootfiles/core/126/filelists/files b/config/rootfiles/core/126/filelists/files
index ce4e51768..90534d725 100644
--- a/config/rootfiles/core/126/filelists/files
+++ b/config/rootfiles/core/126/filelists/files
@@ -1,4 +1,6 @@
 etc/system-release
 etc/issue
+etc/rc.d/init.d/rngd
+lib/udev/rules.d/90-hwrng.rules
 srv/web/ipfire/cgi-bin/credits.cgi
 var/ipfire/langs
diff --git a/config/udev/90-hwrng.rules b/config/udev/90-hwrng.rules
index a93979009..cbc555c11 100644
--- a/config/udev/90-hwrng.rules
+++ b/config/udev/90-hwrng.rules
@@ -1 +1,16 @@
+# do not edit this file, it will be overwritten on update
+
+SUBSYSTEM!="tty", GOTO="ipfire_hwrng_end"
+KERNEL!="ttyACM[0-9]*", GOTO="ipfire_hwrng_end"
+
+SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"
+
+IMPORT{builtin}="usb_id"
+ENV{ID_SERIAL}=="", GOTO="ipfire_hwrng_end"
+SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"
+ENV{ID_USB_INTERFACE_NUM}=="", GOTO="ipfire_hwrng_end"
+
+ATTRS{manufacturer}=="IPFire.org", ATTRS{product}=="Random Number Generator*", ENV{.ID_PORT}=="", SYMLINK+="hwrngtty" RUN+="/bin/stty raw -echo -ixoff -F /dev/hwrngtty 115200" RUN+="/etc/rc.d/init.d/rngd udev-event"
+
+LABEL="ipfire_hwrng_end"
 ACTION=="add|remove", KERNEL=="hw_random", RUN+="/etc/rc.d/init.d/rngd udev-event"
diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd
index 91b70a7b4..0f95fde80 100644
--- a/src/initscripts/system/rngd
+++ b/src/initscripts/system/rngd
@@ -13,8 +13,18 @@
 
 case "${1}" in
 	start)
+		if pidofproc -s /usr/sbin/rngd; then
+			boot_mesg "Random Number Generator Daemon is already running..."
+			echo_ok;
+			exit 0
+		fi
+		if [ -e /dev/hwrngtty ]; then
+			HWRNG=/dev/hwrngtty
+		else
+			HWRNG=/dev/hwrng
+		fi
 		boot_mesg "Starting Random Number Generator Daemon..."
-		loadproc /usr/sbin/rngd --quiet
+		loadproc /usr/sbin/rngd -r $HWRNG --quiet
 		;;
 
 	stop)


hooks/post-receive
--
IPFire 2.x development tree

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-06 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 21:36 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 56726ed954bf1aa1f52214251eb42a7ab478e925 Arne Fitzenreiter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox