diff --git a/config/rootfiles/common/rng-tools b/config/rootfiles/packages/rng-tools similarity index 69% rename from config/rootfiles/common/rng-tools rename to config/rootfiles/packages/rng-tools index 596a911c1..fbeda7800 100644 --- a/config/rootfiles/common/rng-tools +++ b/config/rootfiles/packages/rng-tools @@ -1,4 +1,6 @@ +usr/bin/randstat usr/bin/rngtest usr/sbin/rngd #usr/share/man/man1/rngtest.1 #usr/share/man/man8/rngd.8 +etc/rc.d/init.d/rngd diff --git a/lfs/rng-tools b/lfs/rng-tools index cafb1bcda..6a85a8482 100644 --- a/lfs/rng-tools +++ b/lfs/rng-tools @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2021 IPFire Team # +# Copyright (C) 2007-2023 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -25,12 +25,19 @@ include Config VER = 6.14 +SUMMARY = This is a random number generator daemon THISAPP = rng-tools-$(VER) DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) +PROG = rng-tools +PAK_VER = 1 + +DEPS = + +SERVICES = rngd ############################################################################### # Top-level Rules @@ -50,6 +57,9 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects)) b2 : $(subst %,%_BLAKE2,$(objects)) +dist: + @$(PAK) + ############################################################################### # Downloading, checking, b2sum ############################################################################### @@ -77,5 +87,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --without-rtlsdr cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP) && make $(EXTRA_INSTALL) install + #install initscript + $(call INSTALL_INITSCRIPTS,$(SERVICES)) @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/initscripts/system/rngd b/src/initscripts/packages/rngd similarity index 100% rename from src/initscripts/system/rngd rename to src/initscripts/packages/rngd diff --git a/src/paks/rng-tools/install.sh b/src/paks/rng-tools/install.sh new file mode 100644 index 000000000..a53ccc43c --- /dev/null +++ b/src/paks/rng-tools/install.sh @@ -0,0 +1,30 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007-2023 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +# create startlinks +ln -sf ../init.d/rngd /etc/rc.d/rc0.d/K35rngd +ln -sf ../init.d/rngd /etc/rc.d/rc3.d/S65rngd +ln -sf ../init.d/rngd /etc/rc.d/rc6.d/K35rngd +start_service --background rngd diff --git a/src/paks/rng-tools/uninstall.sh b/src/paks/rng-tools/uninstall.sh new file mode 100644 index 000000000..cc9fbb355 --- /dev/null +++ b/src/paks/rng-tools/uninstall.sh @@ -0,0 +1,28 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007-2023 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service rngd +remove_files +# Remove all start links. +rm -rf /etc/rc.d/rc*.d/*rngd diff --git a/src/paks/rng-tools/update.sh b/src/paks/rng-tools/update.sh new file mode 100644 index 000000000..83bd0ad98 --- /dev/null +++ b/src/paks/rng-tools/update.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007-2023 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh