[selinux-policy: 1143/3172] Collapse commands with grep piped to sed into one sed command.
Daniel J Walsh
dwalsh at fedoraproject.org
Thu Oct 7 20:43:49 UTC 2010
commit 7dca64fa483307c1934a255a2743df473659abda
Author: Chris PeBenito <cpebenito at tresys.com>
Date: Mon Jan 23 20:53:40 2006 +0000
Collapse commands with grep piped to sed into one sed command.
refpolicy/Changelog | 1 +
refpolicy/Makefile | 9 ++++-----
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/refpolicy/Changelog b/refpolicy/Changelog
index 7307c5d..0c39d9e 100644
--- a/refpolicy/Changelog
+++ b/refpolicy/Changelog
@@ -1,3 +1,4 @@
+- Collapse commands with grep piped to sed into one sed command.
- Fix type_change bug in term_user_pty().
- Move ice_tmp_t from miscfiles to xserver.
- Login fixes from Serge Hallyn.
diff --git a/refpolicy/Makefile b/refpolicy/Makefile
index 146204f..c87f7f2 100644
--- a/refpolicy/Makefile
+++ b/refpolicy/Makefile
@@ -250,9 +250,8 @@ $(USERPATH)/system.users: $(M4SUPPORT) tmp/generated_definitions.conf $(USER_FIL
@echo "# This file is replaced on reinstalls of this policy." >> tmp/system.users
@echo "# Please edit local.users to make local changes." >> tmp/system.users
@echo "#" >> tmp/system.users
- $(QUIET) m4 -D self_contained_policy $(M4PARAM) $^ | \
- egrep -v "^[[:blank:]]*($$|#)" | \
- sed -r -e 's/^[[:blank:]]+//' >> tmp/system.users
+ $(QUIET) m4 -D self_contained_policy $(M4PARAM) $^ | sed -r -e 's/^[[:blank:]]+//' \
+ -e '/^[[:blank:]]*($$|#)/d' >> tmp/system.users
$(QUIET) install -m 644 tmp/system.users $@
$(USERPATH)/local.users: config/local.users
@@ -268,8 +267,8 @@ install-appconfig: $(APPFILES)
$(INSTALLDIR)/booleans: $(BOOLEANS)
@mkdir -p $(INSTALLDIR)
- $(QUIET) egrep '^[[:blank:]]*[[:alpha:]]' $(BOOLEANS) \
- | sed -e 's/false/0/g' -e 's/true/1/g' > tmp/booleans
+ $(QUIET) sed -r -e 's/false/0/g' -e 's/true/1/g' \
+ -e '/^[[:blank:]]*($$|#)/d' $(BOOLEANS) | sort > tmp/booleans
$(QUIET) install -m 644 tmp/booleans $@
$(CONTEXTPATH)/files/media: $(APPCONF)/media
More information about the scm-commits
mailing list