From 0095f3d0cdef1f0bb79000300b31c69a977fe18f Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Tue, 16 May 2017 19:30:24 -0500 Subject: [PATCH] The following changes were made: * Added default sysctl.conf * Added usher to manage sysctl.conf * Added /etc/sysctl.d --- Makefile | 7 ++++++- SNAP/sysctl.conf | 10 ++++++++++ SNAP/usher | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 SNAP/sysctl.conf create mode 100755 SNAP/usher diff --git a/Makefile b/Makefile index 21bd246..c6ff7e1 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ URL = https://gitlab.com/procps-ng/procps BRIEF = Utilities providing process information DESC = procps is a set of command line and full-screen utilities that provide \ information out of the pseudo-filesystem most commonly located at /proc -SNAPVER = 2 +SNAPVER = 3 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') @@ -65,11 +65,16 @@ $(ROOT): $(SRCDIR)/watch fi @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ + install -d -v -m 755 $(ROOT)/etc/sysctl.d && \ install -d -v -m 755 $(ROOT)/lib && \ mv -v $(ROOT)/usr/lib/libprocps.so.* $(ROOT)/lib && \ ln -sfv ../../lib/$$(readlink $(ROOT)/usr/lib/libprocps.so) \ $(ROOT)/usr/lib/libprocps.so + @install -d -v -m 755 $(ROOT)/usr/share/procps-ng && \ + install -v -m 644 $(PWD)/SNAP/sysctl.conf \ + $(ROOT)/usr/share/procps-ng/sysctl.conf + test: $(ROOT) @cd $(SRCDIR); \ make check diff --git a/SNAP/sysctl.conf b/SNAP/sysctl.conf new file mode 100644 index 0000000..960134f --- /dev/null +++ b/SNAP/sysctl.conf @@ -0,0 +1,10 @@ +# Configuration for kernel values in /proc/sys +# See sysctl.conf (5) for details + +# The four values in printk denote: console_loglevel, +# default_message_loglevel, minimum_console_loglevel and +# default_console_loglevel respectively. +#kernel.printk = 3 4 1 3 + +# Setting the following to 1 will disable ipv6 +#net.ipv6.conf.all.disable_ipv6 = 1 diff --git a/SNAP/usher b/SNAP/usher new file mode 100755 index 0000000..6793531 --- /dev/null +++ b/SNAP/usher @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +case $1 in + preinst) + exit 0 + ;; + postinst) + if [ ! -f ${TARGET}/etc/sysctl.conf ]; then + cp ${TARGET}/usr/share/procps-ng/sysctl.conf ${TARGET}/etc/sysctl.conf + fi + ;; + prerm) + exit 0 + ;; + postrm) + exit 0 + ;; +esac