mrrl-containers

MRRL version of container scripts
git clone https://ccx.te2000.cz/git/mrrl-containers
Log | Files | Refs

commit 7e84f83fc21d70e6ed54edec67ca7ee120a09bf8
parent 9469b27f1549b6af78d6e789dd333bfb2b60d212
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Fri, 15 Sep 2023 01:32:25 +0200

Generate user-modifiable default /run/resolv.conf for all containers
Diffstat:
Msbin/container_sysroot_run | 5+++++
Mservice_scripts/alsa/run | 5+++++
Mservice_scripts/generic/run | 5+++++
Mservice_scripts/sysroot/run | 5+++++
4 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/sbin/container_sysroot_run b/sbin/container_sysroot_run @@ -32,6 +32,11 @@ if { find ${CONTAINER_TMPFS} -depth -mindepth 2 -delete } if { mkdir -p ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chmod 1770 ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chown root:${CONTAINER_USER} ${CONTAINER_TMPFS}/${tmpfs_dirs} } + +# Create default resolv.conf +if { redirfd -w 1 ${CONTAINER_TMPFS}/run/resolv.conf printf 'nameserver 127.0.0.1' } +if { chown ${CONTAINER_USER}:${CONTAINER_USER} ${CONTAINER_TMPFS}/run/resolv.conf } + if { mount -a --fstab data/fstab } # Put UID/GID/GIDLIST into environment for use by s6-applyuidgid below diff --git a/service_scripts/alsa/run b/service_scripts/alsa/run @@ -28,6 +28,11 @@ if { rm -rf ${CONTAINER_TMPFS} } if { mkdir -p ${CONTAINER_TMPFS}/${tmpfs_dirs} ${CONTAINER_TMPFS}/mnt/${CONTAINER_MNT_DIRS} } if { chmod 1770 ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chown root:${CONTAINER_USER} ${CONTAINER_TMPFS}/${tmpfs_dirs} } + +# Create default resolv.conf +if { redirfd -w 1 ${CONTAINER_TMPFS}/run/resolv.conf printf 'nameserver 127.0.0.1' } +if { chown ${CONTAINER_USER}:${CONTAINER_USER} ${CONTAINER_TMPFS}/run/resolv.conf } + if { mount -a --fstab data/fstab } # Put UID/GID/GIDLIST into environment for use by s6-applyuidgid below diff --git a/service_scripts/generic/run b/service_scripts/generic/run @@ -28,6 +28,11 @@ if { rm -rf ${CONTAINER_TMPFS} } if { mkdir -p ${CONTAINER_TMPFS}/${tmpfs_dirs} ${CONTAINER_TMPFS}/mnt/${CONTAINER_MNT_DIRS} } if { chmod 1770 ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chown root:${CONTAINER_USER} ${CONTAINER_TMPFS}/${tmpfs_dirs} } +# +# Create default resolv.conf +if { redirfd -w 1 ${CONTAINER_TMPFS}/run/resolv.conf printf 'nameserver 127.0.0.1' } +if { chown ${CONTAINER_USER}:${CONTAINER_USER} ${CONTAINER_TMPFS}/run/resolv.conf } + if { mount -a --fstab data/fstab } # Put UID/GID/GIDLIST into environment for use by s6-applyuidgid below diff --git a/service_scripts/sysroot/run b/service_scripts/sysroot/run @@ -28,6 +28,11 @@ if { rm -rf ${CONTAINER_TMPFS} } if { mkdir -p ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chmod 1770 ${CONTAINER_TMPFS}/${tmpfs_dirs} } if { chown root:${CONTAINER_USER} ${CONTAINER_TMPFS}/${tmpfs_dirs} } + +# Create default resolv.conf +if { redirfd -w 1 ${CONTAINER_TMPFS}/run/resolv.conf printf 'nameserver 127.0.0.1' } +if { chown ${CONTAINER_USER}:${CONTAINER_USER} ${CONTAINER_TMPFS}/run/resolv.conf } + if { mount -a --fstab data/fstab } # Put UID/GID/GIDLIST into environment for use by s6-applyuidgid below