Acked-by: Peter Müller peter.mueller@ipfire.org
This patch also creates symlinks that the daemon is automatically started.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
lfs/nqptp | 7 ++++--- src/paks/nqptp/install.sh | 34 ++++++++++++++++++++++++++++++++++ src/paks/nqptp/uninstall.sh | 35 +++++++++++++++++++++++++++++++++++ src/paks/nqptp/update.sh | 26 ++++++++++++++++++++++++++ 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 src/paks/nqptp/install.sh create mode 100644 src/paks/nqptp/uninstall.sh create mode 100644 src/paks/nqptp/update.sh
diff --git a/lfs/nqptp b/lfs/nqptp index f8bf1b8fa..4e669302b 100644 --- a/lfs/nqptp +++ b/lfs/nqptp @@ -26,7 +26,8 @@ include Config
SUMMARY = nqptp is a daemon that monitors timing data from any PTP clocks
-VER = d900567 +# https://github.com/mikebrady/nqptp/archive/$(VER).tar.gz +VER = ad384f9ed3b2cc31e97012ab6bfe5a214ffc65a2
THISAPP = nqptp-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -34,7 +35,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = nqptp -PAK_VER = 2 +PAK_VER = 3
SERVICES = nqptp
@@ -46,7 +47,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = 83db62518577bda0198e989a1274c46b0f0c658cf281fd282b4b1e51544339c00a3e6da43a472e8de50bcd3926c113ca7cd29e8e562de8b1260763d64baa069b +$(DL_FILE)_BLAKE2 = c294012959d8daa54c2a4fc1803cad620c664fc1d0e5f3a865217059b2b9b656fd1c17cfe1c260ca09dc505c7337a77cd6d09fe642c04d3936e274c192e2aaeb
install : $(TARGET)
diff --git a/src/paks/nqptp/install.sh b/src/paks/nqptp/install.sh new file mode 100644 index 000000000..12d93416e --- /dev/null +++ b/src/paks/nqptp/install.sh @@ -0,0 +1,34 @@ +#!/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 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh
+# Extract everything +extract_files
+# Enable auto-start for service +ln -sf ../init.d/nqptp /etc/rc.d/rc0.d/K21nqptp +ln -sf ../init.d/nqptp /etc/rc.d/rc3.d/S98nqptp +ln -sf ../init.d/nqptp /etc/rc.d/rc6.d/K21nqptp
+exit 0 diff --git a/src/paks/nqptp/uninstall.sh b/src/paks/nqptp/uninstall.sh new file mode 100644 index 000000000..2238e0c6f --- /dev/null +++ b/src/paks/nqptp/uninstall.sh @@ -0,0 +1,35 @@ +#!/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 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh
+# Stop the service +service_stop "${NAME}"
+# Delete all program files +remove_files
+# Disable auto-start +rm -vf /etc/rc.d/rc*.d/*nqptp
+exit 0 diff --git a/src/paks/nqptp/update.sh b/src/paks/nqptp/update.sh new file mode 100644 index 000000000..6ce09b972 --- /dev/null +++ b/src/paks/nqptp/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-2020 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh