[packages/adapter: 150/631] - unify /etc/sysconfig files

glen glen at pld-linux.org
Mon Sep 12 19:47:02 CEST 2016


commit f56d5519b61f20a6814f515b83f6a827aced6685
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Apr 6 17:54:25 2005 +0000

    - unify /etc/sysconfig files
    
    Changed files:
        adapter.awk -> 1.145

 adapter.awk | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index 96726f4..0247e0a 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -708,6 +708,30 @@ function use_files_macros(	i, n, t, a)
 		$0 = "%attr(755,root,root) " $0
 	}
 
+	# /etc/sysconfig files
+	# %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
+	if (/\/etc\/sysconfig\// && !/%attr.*/) {
+		$0 = "%attr(640,root,root) " $0
+	}
+
+	if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
+		gsub("%config", "%config(noreplace)")
+	}
+
+	if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
+		gsub("%attr\(%config\s", "%config(noreplace)")
+	}
+
+	if (/\/etc\/sysconfig\// && !/%verify/) {
+		gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+	}
+
+	if (/\/etc\/sysconfig\// && !/%attr\(640/) {
+		gsub("^%attr\(... *,", "%attr(640,");
+	}
+
+
+	# kill leading zeros
 	gsub("%attr\(0", "%attr(")
 
 	# sort %verify attrs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list