Updated c3.sh script (updated setting of ownership).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Mon, 21 Feb 2022 13:29:24 +0000 (14:29 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Mon, 21 Feb 2022 13:29:24 +0000 (14:29 +0100)
scripts/c3.sh
sources/start-order.txt

index d0b4a0c5e992992b57c99cf4cc44f3b50758719e..2b382fdbceb1bc524bb99c4ed14276afbf300bea 100755 (executable)
@@ -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
 
index 720652bb10bbb849a1c03e1238c2a28d3104b9e2..8a9343cebbbee225348dd59e29435a28287b4e85 100644 (file)
@@ -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