From 9944a407634cfd869bbbbf7ab01660bb8d63a720 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sun, 8 Feb 2015 19:08:21 -0600 Subject: [PATCH] Run zmupdate noninteractively following an upgrade --- distros/redhat/zoneminder.el7.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/distros/redhat/zoneminder.el7.spec b/distros/redhat/zoneminder.el7.spec index 7f9dd4028..566322140 100644 --- a/distros/redhat/zoneminder.el7.spec +++ b/distros/redhat/zoneminder.el7.spec @@ -68,7 +68,7 @@ too much degradation of performance. %build %cmake \ - -DZM_TARGET_DISTRO="EL7" \ + -DZM_TARGET_DISTRO="el7" \ -DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \ . @@ -94,6 +94,12 @@ echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wa /usr/bin/semodule_package -o %{_docdir}/%{name}-%{version}/local_zoneminder.pp -m %{_docdir}/%{name}-%{version}/local_zoneminder.mod > /dev/null /usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/local_zoneminder.pp > /dev/null +# Upgrade from a previous version of zoneminder +if [ $1 -eq 2 ] ; then + # Run zmupdate non-interactively + /usr/bin/zmupdate.pl --nointeractive +fi + # Display the README for post installation instructions /usr/bin/less %{_docdir}/%{name}-%{version}/README.Centos7