[packages/adapter: 143/631] - fixups for init.d scripts
glen
glen at pld-linux.org
Mon Sep 12 19:46:27 CEST 2016
commit 2fc0e2744054c409951fb2618c11b9ff06a9d5d5
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Wed Mar 2 22:23:49 2005 +0000
- fixups for init.d scripts
Changed files:
adapter.awk -> 1.138
adapter.awk | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index d43de97..2c9b68a 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -678,8 +678,16 @@ function use_files_macros( i, n, t, a)
gsub("^%{_sbindir}", "%attr(755,root,root) %{_sbindir}")
gsub("^%{_bindir}", "%attr(755,root,root) %{_bindir}")
- if (/^%attr.*\/etc\/rc\.d\/init\.d/ && !/^%attr\(754 *,/) {
- gsub("^%attr\(... *,", "%attr(754,");
+ gsub("%{_sysconfdir}\/rc\.d\/init.d", "/etc/rc.d/init.d")
+ gsub("%{_sysconfdir}\/init.d", "/etc/rc.d/init.d")
+
+ if (/\/etc\/rc\.d\/init\.d/) {
+ if (!/%attr.*\/etc\/rc\.d\/init\.d/) {
+ $0 = "%attr(754,root,root) " $0
+ }
+ if (/^%attr.*\/etc\/rc\.d\/init\.d/ && !/^%attr\(754 *,/) {
+ gsub("^%attr\(... *,", "%attr(754,");
+ }
}
# 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