[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipfire-scm
Subject:    [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 56726ed954bf1aa1f52214251eb42a7a
From:       Arne Fitzenreiter <git () ipfire ! org>
Date:       2018-12-06 21:36:00
Message-ID: 20181206213601.19B6E84FDD6 () people01 ! i ! ipfire ! org
[Download RAW message or body]

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@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@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
_______________________________________________
IPFire-SCM mailing list
IPFire-SCM@lists.ipfire.org
https://lists.ipfire.org/mailman/listinfo/ipfire-scm


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic