From 1436ded757454d1d013bef4df40b19be7424e1af Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Wed, 23 Jul 2014 21:28:49 +0300 Subject: [PATCH] rng-tools: import from oldpackages. no changes --- utils/rng-tools/Makefile | 44 +++++++++++++++++++++++++++++++++ utils/rng-tools/files/rngd.init | 16 ++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 utils/rng-tools/Makefile create mode 100644 utils/rng-tools/files/rngd.init diff --git a/utils/rng-tools/Makefile b/utils/rng-tools/Makefile new file mode 100644 index 000000000..474589c7d --- /dev/null +++ b/utils/rng-tools/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rng-tools +PKG_VERSION:=3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/gkernel/rng-tools/3/ +PKG_MD5SUM:=fa305916ec101c85c0065aeceb81a38d + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/rng-tools + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+USE_UCLIBC:argp-standalone + TITLE:=Daemon for adding entropy to kernel entropy pool + URL:=http://sourceforge.net/projects/gkernel/ +endef + +ifdef CONFIG_USE_UCLIBC +CONFIGURE_VARS += \ + LIBS="-largp" +endif + +define Package/rng-tools/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rngd.init $(1)/etc/init.d/rngd + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngtest $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngd $(1)/sbin/ +endef + +$(eval $(call BuildPackage,rng-tools)) diff --git a/utils/rng-tools/files/rngd.init b/utils/rng-tools/files/rngd.init new file mode 100644 index 000000000..74d23b31a --- /dev/null +++ b/utils/rng-tools/files/rngd.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=98 + +RNGD_INTERVAL=30 +RNGD_AMOUNT=4000 +RNGD_DEVICE="/dev/urandom" + +start() { + service_start /sbin/rngd -r $RNGD_DEVICE -W $RNGD_AMOUNT -t $RNGD_INTERVAL +} + +stop() { + service_stop /sbin/rngd +}