add bootsrap updater to post
@@ -167,12 +167,24 @@ systemctl restart httpd.service >/dev/null 2>&1 || :
systemctl enable tftp-server.socket >/dev/null 2>&1 || :
systemctl restart tftp-server.socket >/dev/null 2>&1 || :
+if [ ! -d %{_localstatedir}/warewulf/bootstrap ];then
+bootstraps=`wwsh bootstrap list | tail -n +2 | awk '{print $1}'`
+
+for boot in $bootstraps; do
+ echo "Updating bootstrap image: $boot"
+ wwsh bootstrap export ${boot} /tmp/.exported_bootstrap
+ wwsh -y bootstrap import /tmp/.exported_bootstrap --name ${boot}
+ rm -f /tmp/.exported_bootstrap
+done
+fi
+
mkdir -p %{_localstatedir}/warewulf/ipxe %{_localstatedir}/warewulf/bootstrap 2>/dev/null || :
semanage fcontext -a -t httpd_sys_content_t '%{_localstatedir}/warewulf/ipxe(/.*)?' 2>/dev/null || :
semanage fcontext -a -t httpd_sys_content_t '%{_localstatedir}/warewulf/bootstrap(/.*)?' 2>/dev/null || :
restorecon -R %{_localstatedir}/warewulf/bootstrap || :
restorecon -R %{_localstatedir}/warewulf/ipxe || :
+
%postun -n %{pname}-server%{PROJ_DELIM}
if [ $1 -eq 0 ] ; then
semanage fcontext -d -t httpd_sys_content_t '%{_localstatedir}/warewulf/ipxe(/.*)?' 2>/dev/null || :
