=== modified file 'zsh-functions/confz_containers_init' --- old/zsh-functions/confz_containers_init 2021-12-14 00:12:27 +0000 +++ new/zsh-functions/confz_containers_init 2021-11-25 23:15:49 +0000 @@ -1,4 +1,4 @@ -# vim: ft=zsh noet ts=4 sts=4 sw=4 +# vim: ft=zsh noet ts=4 sts=4 sw=4 # find: ‘./event’: Permission denied @@ -434,7 +434,7 @@ chmod $vars[mode] $vars[root]/$vars[target] || die } -confz_container_generic_layout_check() { +confz_container_alpine_base_layout_check() { checkvars root defvar uid 0 defvar gid 0 @@ -443,10 +443,6 @@ require fs_m filename="$vars[root]" mode=0755 require fs_o filename="$vars[root]" owner=$vars[uid]:$vars[gid] - require fs_d filename="$vars[root]/.inbox" - require fs_m filename="$vars[root]/.inbox" mode=0755 - require fs_o filename="$vars[root]/.inbox" owner=$vars[uid]:$vars[gid] - require fs_d filename="$vars[root]/dev" require fs_m filename="$vars[root]/dev" mode=0755 require fs_o filename="$vars[root]/dev" owner=$vars[uid]:$vars[gid] @@ -459,29 +455,9 @@ require fs_m filename="$vars[root]/dev/shm" mode=0755 require fs_o filename="$vars[root]/dev/shm" owner=$vars[uid]:$vars[gid] - require fs_d filename="$vars[root]/mnt" - require fs_m filename="$vars[root]/mnt" mode=0755 - require fs_o filename="$vars[root]/mnt" owner=$vars[uid]:$vars[gid] - - require fs_d filename="$vars[root]/mnt/ns" - require fs_m filename="$vars[root]/mnt/ns" mode=0755 - require fs_o filename="$vars[root]/mnt/ns" owner=$vars[uid]:$vars[gid] - - require fs_d filename="$vars[root]/run" - require fs_m filename="$vars[root]/run" mode=0755 - require fs_o filename="$vars[root]/run" owner=$vars[uid]:$vars[gid] - - require fs_d filename="$vars[root]/tmp" - require fs_m filename="$vars[root]/tmp" mode=0755 - require fs_o filename="$vars[root]/tmp" owner=$vars[uid]:$vars[gid] -} - -confz_container_alpine_base_layout_check() { - checkvars root - defvar uid 0 - defvar gid 0 - - require container_generic_layout :root :uid :gid + require fs_d filename="$vars[root]/dev/syslog" + require fs_m filename="$vars[root]/dev/syslog" mode=0755 + require fs_o filename="$vars[root]/dev/syslog" owner=$vars[uid]:$vars[gid] require fs_d filename="$vars[root]/etc" require fs_m filename="$vars[root]/etc" mode=0755 @@ -755,36 +731,3 @@ require container_alpine_apk :arch \ root=$root user=container-$vars[image_name] } - -# --- Void --- - -confz_container_void_xbps_check() { - checkvars user root arch mirror - defvar xbps_executable xbps - do_command=( - env XBPS_ARCH=$vars[arch] - s6-setuidgid $vars[user] - $vars[xbps_executable] - xbps-install - --sync - --rootdir $vars[root] - --repository $vars[mirror] - # --yes - base-files xbps - ) - [[ -f $vars[root]/usr/bin/xbps-install ]] -} - -confz_container_void_image_check() { - checkvars containers_dir image_name arch - defvar mirror https://mirror.fit.cvut.cz/voidlinux/ - #defvar hostname $vars[image_name] - #defvar locale C.UTF-8 - - local root=$vars[containers_dir]/systems/$vars[image_name] - - require container_sysroot_user %uid %gid :containers_dir :image_name - require container_generic_layout :uid :gid root=$root - require container_void_xbps :arch :mirror \ - root=$root user=container-$vars[image_name] -}