diff --git a/seed/applicationservice/2022.03.08/base/manual/install/install_host b/seed/applicationservice/2022.03.08/base/manual/install/install_host index 03ab9aa..eb3b610 100755 --- a/seed/applicationservice/2022.03.08/base/manual/install/install_host +++ b/seed/applicationservice/2022.03.08/base/manual/install/install_host @@ -15,6 +15,8 @@ systemctl restart systemd-networkd systemctl enable systemd-resolved systemctl restart systemd-resolved # systemctl mask dev-hugepages.mount +systemctl enable risotto-images.timer +systemctl restart risotto-images.timer #nft add table nat #nft flush table nat; diff --git a/seed/applicationservice/2022.03.08/base/manual/install/install_image b/seed/applicationservice/2022.03.08/base/manual/install/install_image index b412782..35b584b 100755 --- a/seed/applicationservice/2022.03.08/base/manual/install/install_image +++ b/seed/applicationservice/2022.03.08/base/manual/install/install_image @@ -105,25 +105,23 @@ if [ -n "$COPR" ]; then cd - > /dev/null fi if [ "$FUSION" = true ]; then - dnf -y install "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$RELEASEVER.noarch.rpm" --installroot="$IMAGE_NAME_RISOTTO_IMAGE_DIR" + dnf -y install "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$RELEASEVER.noarch.rpm" --installroot="$IMAGE_NAME_RISOTTO_IMAGE_DIR" > /dev/null fi # FIXME verifier s'il y a des modifs sur pre/post if [ -f "$IMAGE_NAME_RISOTTO_IMAGE_DIR".base.pkgs ] && [ -f "$IMAGE_NAME_RISOTTO_IMAGE_DIR".pkgs ]; then echo " - différence(s) avec les paquets de base" - diff -u "$IMAGE_NAME_RISOTTO_IMAGE_DIR".base.pkgs "$BASE_PKGS_FILE" && NEW_BASE=false || NEW_BASE=true -else - NEW_BASE=true -fi -new_package -if [ "$NEW_BASE" = false ]; then - echo " - différence(s) avec les paquets de l'image" - diff -u "$IMAGE_NAME_RISOTTO_IMAGE_DIR".pkgs "$IMAGE_NAME_RISOTTO_IMAGE_DIR".pkgs.new && INSTALL=false || INSTALL=true + diff -u "$IMAGE_NAME_RISOTTO_IMAGE_DIR".base.pkgs "$BASE_PKGS_FILE" && INSTALL=false || INSTALL=true else INSTALL=true fi +new_package +if [ "$INSTALL" = false ]; then + echo " - différence(s) avec les paquets de l'image" + diff -u "$IMAGE_NAME_RISOTTO_IMAGE_DIR".pkgs "$IMAGE_NAME_RISOTTO_IMAGE_DIR".pkgs.new && INSTALL=false || INSTALL=true +fi find $IMAGE_NAME/manual -type f -exec md5sum '{}' \; > "$IMAGE_NAME_RISOTTO_IMAGE_DIR".md5sum.new -if [ "$NEW_BASE" = false ]; then +if [ "$INSTALL" = false ]; then diff -u "$IMAGE_NAME_RISOTTO_IMAGE_DIR".md5sum "$IMAGE_NAME_RISOTTO_IMAGE_DIR".md5sum.new && INSTALL=false || INSTALL=true fi if [ "$INSTALL" = true ]; then diff --git a/seed/applicationservice/2022.03.08/host-systemd-machined/templates/risotto-images.service b/seed/applicationservice/2022.03.08/host-systemd-machined/templates/risotto-images.service new file mode 100644 index 0000000..6b066d8 --- /dev/null +++ b/seed/applicationservice/2022.03.08/host-systemd-machined/templates/risotto-images.service @@ -0,0 +1,12 @@ +[Unit] +Description=Daily images update activities +After=network.target local-fs.target systemd-logind.service + +[Service] +Type=oneshot +WorkingDirectory=%%host_install_dir +ExecStart=%%host_install_dir/install_images %%host_name +ExecStart=%%host_install_dir/install_machines %%host_name + +[Install] +WantedBy=multi-user.target diff --git a/seed/applicationservice/2022.03.08/host-systemd-machined/templates/risotto-images.timer b/seed/applicationservice/2022.03.08/host-systemd-machined/templates/risotto-images.timer new file mode 100644 index 0000000..ba81b3d --- /dev/null +++ b/seed/applicationservice/2022.03.08/host-systemd-machined/templates/risotto-images.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Daily images update activities + +[Timer] +OnCalendar=*-*-* 5:00 +Persistent=true + +[Install] +WantedBy=timers.target