diff --git a/slurm.changes b/slurm.changes index e506363..0be850f 100644 --- a/slurm.changes +++ b/slurm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 5 16:00:50 UTC 2018 - Christian Goll + +- fixed code in %pretrans section to be compatible with lua 5.1 + ------------------------------------------------------------------- Tue Nov 20 11:21:37 UTC 2018 - eich@suse.com diff --git a/slurm.spec b/slurm.spec index f89fbbe..5f78d78 100644 --- a/slurm.spec +++ b/slurm.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -593,8 +593,13 @@ exit 0 } %define _test_rest() %{?with_systemd: os.remove("/run/%{1}.rst") if os.execute() and os.getenv("YAST_IS_RUNNING") ~= "instsys" then - if os.execute("systemctl status %{1} &>/dev/null") then - f=io.open("/run/%{1}.rst","w"); f:close() + local handle = io.popen("systemctl is-enabled %{1} 2>&1") + local str = handle:read("*a"); handle:close() + str = string.gsub(str, '^%%s+', '') + str = string.gsub(str, '%%s+$', '') + str = string.gsub(str, '[\\n\\r]+', ' ') + if str == "enabled" then + local file = io.open("/run/%{1}.rst","w"); file:close() end end }