From 71575aab2b5e4e16a1079641c6b22b68010ee38d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Mon, 21 Feb 2022 14:29:24 +0100 Subject: [PATCH] Updated c3.sh script (updated setting of ownership). --- scripts/c3.sh | 21 +++++++++++++++++---- sources/start-order.txt | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/c3.sh b/scripts/c3.sh index d0b4a0c..2b382fd 100755 --- a/scripts/c3.sh +++ b/scripts/c3.sh @@ -224,6 +224,13 @@ populate_c3d() done fi + echo "Created and populated the container creation and configuration directory." +} + +set_c3d_ownership() +{ + echo "Setting ownership of the container creation and configuration directory files." + OWNER_LIST=$CONTAINER_BUILDROOT/c3d/owner.txt if [ -f $OWNER_LIST ] then @@ -232,12 +239,16 @@ populate_c3d() --regexp='^$' $OWNER_LIST | while read LINE do TGT_OWNER=$(echo "$LINE" | cut -f 1 -d ' ') - TGT_PATH=$(echo "$LINE" | cut -f 2 -d ' ') - chroot $CONTAINER_BUILDROOT chown $TGT_OWNER /c3d/$TGT_PATH + GLOB_TGT_PATH=$(echo "$LINE" | cut -f 2 -d ' ') + for BUILDROOT_TGT_PATH in $CONTAINER_BUILDROOT/c3d/$GLOB_TGT_PATH + do + TGT_PATH=$(echo $BUILDROOT_TGT_PATH | sed "s|^$CONTAINER_BUILDROOT||") + chroot $CONTAINER_BUILDROOT chown $TGT_OWNER $TGT_PATH + done done fi - echo "Created and populated the container creation and configuration directory." + echo "Set ownership of the container creation and configuration directory files." } set_variables() @@ -477,11 +488,13 @@ create_environment_file create_build_path +populate_c3d + preinstall copy_and_install -populate_c3d +set_c3d_ownership postinstall diff --git a/sources/start-order.txt b/sources/start-order.txt index 720652b..8a9343c 100644 --- a/sources/start-order.txt +++ b/sources/start-order.txt @@ -25,7 +25,7 @@ group 5: group 6: fds.in 51 ldap.in 52 - pns.in 53 + pki.in 53 sns.in 54 wiki.in 55 -- 2.54.0