Move all to deprecated folder.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
Exit with a special value when RNG modules are not available
|
||||
|
||||
Instead of returning with an error, exit with a special value when the
|
||||
RNG kernel modules are not present in the kernel. This is not really a
|
||||
hard failure.
|
||||
|
||||
Patch borrowed from Fedora, at
|
||||
http://pkgs.fedoraproject.org/cgit/rng-tools.git/tree/rngd-exit-code.patch.
|
||||
|
||||
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
|
||||
|
||||
--- a/rngd.c
|
||||
+++ b/rngd.c
|
||||
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
|
||||
message(LOG_DAEMON|LOG_ERR,
|
||||
"Maybe RNG device modules are not loaded\n");
|
||||
}
|
||||
- return 1;
|
||||
+ return 66;
|
||||
}
|
||||
|
||||
if (arguments->verbose) {
|
||||
@@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_RNG_TOOLS
|
||||
bool "rng-tools"
|
||||
select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
|
||||
# For rdrand ligcrypt is required and it's not obvious to users
|
||||
select BR2_PACKAGE_LIBGCRYPT if BR2_i386 || BR2_x86_64
|
||||
help
|
||||
Daemon to use hardware random number generators.
|
||||
|
||||
http://sourceforge.net/projects/gkernel/
|
||||
48
deprecated/firmware/buildroot/package/rng-tools/S21rngd
Executable file
48
deprecated/firmware/buildroot/package/rng-tools/S21rngd
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME="rngd"
|
||||
DAEMON="/usr/sbin/${NAME}"
|
||||
DAEMON_ARGS=""
|
||||
CFG_FILE="/etc/default/${NAME}"
|
||||
PID_FILE="/var/run/${NAME}.pid"
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
|
||||
|
||||
start()
|
||||
{
|
||||
printf "Starting ${NAME}: "
|
||||
start-stop-daemon -S -q -x "${DAEMON}" -- ${DAEMON_ARGS}
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
printf "Stopping ${NAME}: "
|
||||
# This daemon does not exit properly with the default TERM signal unless
|
||||
# it's forced to work by something reading /dev/random. Killing it and
|
||||
# removing its PID file is more straightforward.
|
||||
if start-stop-daemon -K -q -s KILL -p "${PID_FILE}" -n "${NAME}"; then
|
||||
rm -f "${PID_FILE}"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,3 @@
|
||||
# From http://sourceforge.net/projects/gkernel/files/rng-tools/5/
|
||||
md5 6726cdc6fae1f5122463f24ae980dd68 rng-tools-5.tar.gz
|
||||
sha1 3092768ac45315a5dcc0170d05566d1d00dbad96 rng-tools-5.tar.gz
|
||||
38
deprecated/firmware/buildroot/package/rng-tools/rng-tools.mk
Normal file
38
deprecated/firmware/buildroot/package/rng-tools/rng-tools.mk
Normal file
@@ -0,0 +1,38 @@
|
||||
################################################################################
|
||||
#
|
||||
# rng-tools
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RNG_TOOLS_VERSION = 5
|
||||
RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RNG_TOOLS_VERSION)
|
||||
RNG_TOOLS_LICENSE = GPLv2
|
||||
RNG_TOOLS_LICENSE_FILES = COPYING
|
||||
|
||||
# Work around for uClibc or musl toolchains which lack argp_*()
|
||||
# functions.
|
||||
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
|
||||
RNG_TOOLS_CONF_ENV += LIBS="-largp"
|
||||
RNG_TOOLS_DEPENDENCIES += argp-standalone
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
RNG_TOOLS_DEPENDENCIES += libgcrypt
|
||||
else
|
||||
RNG_TOOLS_CONF_OPTS += --without-libgcrypt
|
||||
endif
|
||||
|
||||
define RNG_TOOLS_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/rng-tools/S21rngd \
|
||||
$(TARGET_DIR)/etc/init.d/S21rngd
|
||||
endef
|
||||
|
||||
define RNG_TOOLS_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/rng-tools/rngd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/rngd.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -fs ../../../../usr/lib/systemd/system/rngd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rngd.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
10
deprecated/firmware/buildroot/package/rng-tools/rngd.service
Normal file
10
deprecated/firmware/buildroot/package/rng-tools/rngd.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Hardware RNG Entropy Gatherer Daemon
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS
|
||||
SuccessExitStatus=66
|
||||
EnvironmentFile=-/etc/default/rngd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user