summaryrefslogtreecommitdiff
path: root/sub/layout/copylayout
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-29 15:00:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-29 15:00:01 +0000
commit3dcb6c6a73cd16acc7bcae9e54cda16fed89f35b (patch)
treee2b2b231622470ddc95a74f62b3cebcdcc492914 /sub/layout/copylayout
parent5809b2dc1536794cff7df2ab4f79d2fe7b6720bc (diff)
downloadlh-bootstrap-3dcb6c6a73cd16acc7bcae9e54cda16fed89f35b.tar.xz
Reimport userfs, rwfs and s6-rc from master
Diffstat (limited to 'sub/layout/copylayout')
-rwxr-xr-xsub/layout/copylayout9
1 files changed, 6 insertions, 3 deletions
diff --git a/sub/layout/copylayout b/sub/layout/copylayout
index 96dad43..01e1574 100755
--- a/sub/layout/copylayout
+++ b/sub/layout/copylayout
@@ -3,13 +3,17 @@
output="$1"
s6-hiercopy layout/rootfs $output/rootfs
-chown -R 0:0 $output/rootfs
+chown -R 0:0 $output/rootfs $output/rwfs $output/userfs
find "$output/rootfs" -type f -name .empty -size 0c -exec s6-rmrf {} \;
+s6-hiercopy layout/rwfs $output/rwfs
+find "$output/rwfs" -type f -name .empty -size 0c -exec s6-rmrf {} \;
+s6-hiercopy layout/userfs $output/userfs
+find "$output/userfs" -type f -name .empty -size 0c -exec s6-rmrf {} \;
buildtime=$(s6-clock)
hostarch=$(s6-echo -- $TRIPLE | cut -f1 -d-)
-sed -i -e "s/%%HOSTNAME%%/lh-$hostarch/g" $output/rootfs/etc/motd $output/rootfs/etc/issue.net $output/rootfs/root/.execline-shell
+sed -i -e "s/%%HOSTNAME%%/lh-$hostarch/g" $output/rootfs/etc/motd $output/rootfs/etc/issue.net $output/rootfs/root/.execline-shell $output/rootfs/etc/s6-rc/source-base/00/up
while read file user group perms ; do
if s6-test -n "$file" -a "$file" != "#" ; then
@@ -18,7 +22,6 @@ while read file user group perms ; do
fi
done < sub/layout/permissions
-
# If dynamic: copy shared libs from the toolchain into the target
if ! ${BUILD_HOST_STATIC} ; then