warewulf4/adjust_overlays.sh
Egbert Eich e76a9480c0 - Warewulf v4.5.8 simplifies the wwinit boot process for SELinux
and configures tmpfs to spread the node image across all
  available NUMA nodes. It also improves the detection of kernels
  in the container image to more reliably detect the newest
  available kernel and to avoid debug / rescue kernels.
- Warewulf v4.5.7 fixes the ability to override overlay files
  configured in profiles with overlays configured per-node; fixes
  a template processing bug bug in development-time overlay
  rendering; and improves the preview dracut-based boot process to
  better support a "secure" boot process.
- removed added-cow-option-to-bind.patch as now in upstream
  * Show more information during `wwctl container <shell|exec>`
    about when and if the container image will be rebuilt.
  * Command-line completion for `wwctl overlay <edit|delete|chmod|chown>`.
  * Display an error during boot if no container is defined.
  * `wwctl container list --kernel` shows the kernel detected for
    each container.
  *  `wwctl container list --size` shows the uncompressed size of
     each container. `--compressed` shows the compressed size, and
     `--chroot` shows the size of the container source on the server.
  * Add a logrotate config for `warewulfd.log`.

OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=95
2025-01-13 12:20:47 +00:00

48 lines
1.0 KiB
Bash

#! /bin/sh
# when updating from an older version of the overlay package
# move added/modified overlay files to the new location.
error=0
src=/usr/share/warewulf/overlays
dst=/var/lib/warewulf/overlays
test -d $src || exit 0
for i in $(find -P $src -maxdepth 1 -mindepth 1 -type d)
do
d=$(basename -s "" $i)
if [ ! -d $dst/$d ]
then
mkdir -p /var/lib/warewulf/overlays/$d/rootfs || { error=1; continue; }
elif [ ! -d $dst/$d/rootfs ]
then
mkdir -p $dst/$d/rootfs || { error=1; continue; }
fi
for j in $(find -P $src/$d -not -type d)
do
D=$(dirname $j)
D=${D##$src/$d}
f=$(basename -s ".rpmsave" $j)
if [ ! -d $dst/$d/rootfs/$D ]
then
mkdir -p $dst/$d/rootfs/$D || { error=1; continue; }
fi
if [ ! -e $dst/$d/rootfs/$D/$f ]
then
mv $j $dst/$d/rootfs/$D/$f
elif [ ! -e $dst/$d/rootfs/$D/$f.rpmsave ]
then
mv $j $dst/$d/rootfs/$D/$f.rpmsave
else
error=1
fi
done
done
if [ $error -gt 0 ]
then
echo "Cannot copy all files - check $src manually" >&2
else
find -P $src -type d -delete
fi