mrrl-containers

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

commit a509f50ced0a410d96e27869e5c99259cfca95dc
parent 1e36a30eb2706a6d0848b7cca706987d7b7eba21
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Fri, 24 Jun 2022 23:20:21 +0200

make /etc/profile.d for nix
Diffstat:
Mzsh-functions/confz_containers_init | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/zsh-functions/confz_containers_init b/zsh-functions/confz_containers_init @@ -54,7 +54,7 @@ confz_container_service_check() { require fs_contentnl filename=$vars[svc_dir]/data/fstab \ content=$vars[fstab] require fs_m filename=$vars[svc_dir]/data/fstab mode=644 - + require fs_d filename=$vars[svc_dir]/env if [[ -n $vars[fstab_post] ]]; then require fs_contentnl filename=$vars[svc_dir]/env/NS_FSTAB \ @@ -62,7 +62,7 @@ confz_container_service_check() { require fs_contentnl filename=$vars[svc_dir]/data/fstab_post \ content=$vars[fstab_post] else - require fs_r filename=$vars[svc_dir]/env/NS_FSTAB + require fs_r filename=$vars[svc_dir]/env/NS_FSTAB require fs_r filename=$vars[svc_dir]/data/fstab_post fi @@ -134,7 +134,7 @@ confz_container_user_check() { </etc/passwd while IFS= read line; do entry=( "${${(s.:.)line}[@]}" ) # name:password:UID:GID:GECOS:directory:shell - # 1 :2 :3 :4 :5 :6 :7 + # 1 :2 :3 :4 :5 :6 :7 if [[ $entry[1] == $vars[user_name] ]]; then unify uid "$entry[3]" unify gid "$entry[4]" @@ -919,11 +919,17 @@ confz_container_nix_base_files_check() { "export LANG=${(q)vars[locale]}" "export LC_COLLATE=C" ) + require fs_d filename="$vars[root]/etc/profile.d" + require fs_m filename="$vars[root]/etc/profile.d" mode=0755 + require fs_o filename="$vars[root]/etc/profile.d" owner=$vars[uid]:$vars[gid] + require fs_contentnl filename="$vars[root]/etc/profile.d/locale.sh" \ content="${(F)locale_lines}" require fs_m filename="$vars[root]/etc/profile.d/locale.sh" mode=0644 require fs_o filename="$vars[root]/etc/profile.d/locale.sh" owner=$vars[uid]:$vars[gid] + # TODO: source Nix stuff from profile + require container_template_file :root :uid :gid \ template=alpine name=etc/protocols