From 7adf9370065bffee3f32edd10a42a0fc207816c6 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 19 Aug 2015 15:02:32 +0200 Subject: [PATCH] security-manager-policy-reload: do not depend on GNU sed \U (= make replacement uppercase) is a GNU sed extension which is not supported by other sed implementation's (like the one from busybox). When using busybox, the bucket for user profiles became USER_TYPE_Uadmin instead USER_TYPE_ADMIN. To make SecurityManager more portable, better use tr to turn the bucket name into uppercase. Change-Id: I425256d3e9bd6619678763cbe1657e926116d48d Signed-off-by: Patrick Ohly --- policy/security-manager-policy-reload | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policy/security-manager-policy-reload b/policy/security-manager-policy-reload index b131f4d..41f223b 100755 --- a/policy/security-manager-policy-reload +++ b/policy/security-manager-policy-reload @@ -35,7 +35,7 @@ END find "$POLICY_PATH" -name "usertype-*.profile" | while read file do - bucket="`echo $file | sed -r 's|.*/usertype-(.*).profile$|USER_TYPE_\U\1|'`" + bucket="`echo $file | sed -r 's|.*/usertype-(.*).profile$|USER_TYPE_\1|' | tr '[:lower:]' '[:upper:]'`" # Re-create the bucket with empty contents cyad --delete-bucket=$bucket || true -- 2.7.4