]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
udev: Drop hwrng rules
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 31 Jul 2023 13:43:47 +0000 (13:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 31 Jul 2023 13:47:31 +0000 (13:47 +0000)
This is another fragment of rngd - the gift that keeps giving.

The udev rules file contains a lot of stuff for a prototype which never
went into production. So, that can be dropped.

It would have been left with one rule that starts rngd whenever a HWRNG
is being found. That is however no longer needed as rngd is being
started in the init process. We no longer need to initialize it as early
as possible to seed the kernel's PRNG.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/udev
config/rootfiles/core/177/update.sh
config/udev/90-hwrng.rules [deleted file]
lfs/rng-tools
lfs/udev
src/initscripts/packages/rngd

index a34ee46c3258a6c8adc2d47dea30c5d979912783..5cd9e077f4ddc26d1e8efaddc3224158ae915e37 100644 (file)
@@ -72,7 +72,6 @@ lib/udev/rules.d/75-net-description.rules
 lib/udev/rules.d/75-probe_mtd.rules
 lib/udev/rules.d/78-sound-card.rules
 lib/udev/rules.d/80-drivers.rules
-lib/udev/rules.d/90-hwrng.rules
 lib/udev/rules.d/99-aqm.rules
 lib/udev/rules.d/99-offloading.rules
 lib/udev/scsi_id
index b2af611c194b4f7812b4ab9148abe4e5b720fe66..2ab1568b9dcec3c7c93c4f3eb4a66c1422988b29 100644 (file)
@@ -105,6 +105,7 @@ if [ ! -e "/opt/pakfire/db/installed/meta-rng-tools" ]; then
                /etc/rc.d/init.d/rngd \
                /etc/rc.d/rc*.d/*rngd
 fi
+rm -vf /lib/udev/rules.d/90-hwrng.rules
 
 # Extract files
 extract_files
diff --git a/config/udev/90-hwrng.rules b/config/udev/90-hwrng.rules
deleted file mode 100644 (file)
index cbc555c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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"
index c3f1e205cdd47f4e7482dbd1b56fcbce7f77f8be..fb0d729e3a2d7a156d10e060688939c5e3721176 100644 (file)
@@ -33,7 +33,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = rng-tools
-PAK_VER    = 3
+PAK_VER    = 4
 
 DEPS       =
 
index e712ef6ea00dac67093bf20abbe9586ad274617a..8f3ce425124c6b095dc3e30cfc909d56aa46f4a8 100644 (file)
--- a/lfs/udev
+++ b/lfs/udev
@@ -122,10 +122,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        install -v -m 644 $(DIR_SRC)/config/udev/60-net.rules \
                /lib/udev/rules.d
 
-       # Install hwrng rules.
-       install -v -m 644 $(DIR_SRC)/config/udev/90-hwrng.rules \
-               /lib/udev/rules.d
-
        # Install AQM rules
        install -v -m 644 $(DIR_SRC)/config/udev/99-aqm.rules \
                /lib/udev/rules.d
index ba3e72d3abde8816a26a9b1c7f72ee2fe5df772a..61e2821aa68c7b38ec4eccd9f63819246c8abca1 100644 (file)
 
 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 -r $HWRNG --quiet
+               loadproc /usr/sbin/rngd --quiet
                ;;
 
        stop)
@@ -53,10 +43,6 @@ case "${1}" in
                statusproc /usr/sbin/rngd
                ;;
 
-       udev-event)
-               $0 restart &>/dev/null
-               ;;
-
        *)
                echo "Usage: ${0} {start|stop|restart|status}"
                exit 1