From cab2e79060bd936a907535e81ba75483c1eb1dc6 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Thu, 28 Jul 2022 16:49:27 +0200
Subject: [PATCH] oniro-sysctl: Use a priority number for sysctl conf files

Having a priority number makes it easier to order other configurations
for achiving overriding results.
This also cleans up a bit the recipe (FILES not needed, formatting
etc.).

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 .../recipes-core/oniro-sysctl/oniro-sysctl.bb | 23 ++++++++-----------
 .../{oniro-bpf.conf => 10-oniro-bpf.conf}     |  0
 ...iro-general.conf => 10-oniro-general.conf} |  0
 ...o-net-ipv4.conf => 10-oniro-net-ipv4.conf} |  0
 ...o-net-ipv6.conf => 10-oniro-net-ipv6.conf} |  0
 5 files changed, 10 insertions(+), 13 deletions(-)
 rename meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/{oniro-bpf.conf => 10-oniro-bpf.conf} (100%)
 rename meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/{oniro-general.conf => 10-oniro-general.conf} (100%)
 rename meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/{oniro-net-ipv4.conf => 10-oniro-net-ipv4.conf} (100%)
 rename meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/{oniro-net-ipv6.conf => 10-oniro-net-ipv6.conf} (100%)

diff --git a/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl.bb b/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl.bb
index 8faeb415..d0e809f4 100644
--- a/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl.bb
+++ b/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl.bb
@@ -8,24 +8,21 @@ DESCTIPTION = "This recipes provides a set of Oniro Project specific settings fo
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
 
-SRC_URI = 	" 				\
-		file://oniro-bpf.conf 		\
-		file://oniro-general.conf 	\
-		file://oniro-net-ipv4.conf 	\
-		file://oniro-net-ipv6.conf 	\
-		"
+SRC_URI = " \
+	file://10-oniro-bpf.conf \
+	file://10-oniro-general.conf \
+	file://10-oniro-net-ipv4.conf \
+	file://10-oniro-net-ipv6.conf \
+	"
 inherit allarch
 
-
 do_configure[noexec] = "1"
 do_compile[noexec] = "1"
 
 do_install() {
 	install -d "${D}/${sysconfdir}/sysctl.d"
-	install -m 0644 "${WORKDIR}/oniro-general.conf" "${D}${sysconfdir}/sysctl.d/"
-	install -m 0644 "${WORKDIR}/oniro-net-ipv4.conf" "${D}${sysconfdir}/sysctl.d/"
-	install -m 0644 "${WORKDIR}/oniro-net-ipv6.conf" "${D}${sysconfdir}/sysctl.d/"
-	install -m 0644 "${WORKDIR}/oniro-bpf.conf" "${D}${sysconfdir}/sysctl.d/"
+	install -m 0644 "${WORKDIR}/10-oniro-general.conf" "${D}${sysconfdir}/sysctl.d/"
+	install -m 0644 "${WORKDIR}/10-oniro-net-ipv4.conf" "${D}${sysconfdir}/sysctl.d/"
+	install -m 0644 "${WORKDIR}/10-oniro-net-ipv6.conf" "${D}${sysconfdir}/sysctl.d/"
+	install -m 0644 "${WORKDIR}/10-oniro-bpf.conf" "${D}${sysconfdir}/sysctl.d/"
 }
-
-FILES:${PN} += "${sysconfdir}/sysctl.d/oniro-*"
diff --git a/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-bpf.conf b/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-bpf.conf
similarity index 100%
rename from meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-bpf.conf
rename to meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-bpf.conf
diff --git a/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-general.conf b/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-general.conf
similarity index 100%
rename from meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-general.conf
rename to meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-general.conf
diff --git a/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-net-ipv4.conf b/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-net-ipv4.conf
similarity index 100%
rename from meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-net-ipv4.conf
rename to meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-net-ipv4.conf
diff --git a/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-net-ipv6.conf b/meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-net-ipv6.conf
similarity index 100%
rename from meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/oniro-net-ipv6.conf
rename to meta-oniro-core/recipes-core/oniro-sysctl/oniro-sysctl/10-oniro-net-ipv6.conf
-- 
GitLab