From: buildmaster Date: Thu, 24 Jan 2019 15:17:15 +0000 (+0100) Subject: Execute lic.bat X-Git-Url: https://repo.cephalix.eu/gitweb/?a=commitdiff_plain;h=de508b0d4590fee2d6844e422d36ea0526b6e24d;p=Win10ActKMS.git Execute lic.bat --- diff --git a/Win10ActKMS.sls b/Win10ActKMS.sls index 6054fe3..d37ad80 100644 --- a/Win10ActKMS.sls +++ b/Win10ActKMS.sls @@ -1,5 +1,5 @@ ############################################################################### -# SLS: PACKAGE +# SLS: Win10ActKMS # Copyright (c) 2018 Helmuth Varkoly, Nuermberg, Germany. # All rights reserved. # @@ -8,13 +8,17 @@ # Description: SLS to use with OSS's softwaremanagement ############################################################################### {% set status = salt.license.licensed %} -{% set LIC = salt['grains.get']('LIC_Win10ActKMS') %} +#{% set LIC = salt['grains.get']('LIC_Win10ActKMS') %} -PACKAGE: -{% if status != 'True' %} - cmd.run: - - name: 'cscript.exe //B "%systemroot%\system32\slmgr.vbs" /ipk {{ LIC }}' - - name: 'cscript.exe //B "%systemroot%\system32\slmgr.vbs" /skms KMS_SERVER_IP:KMS_SERVER_PORT' - - name: 'cscript.exe //B "%systemroot%\system32\slmgr.vbs" /ato' -{% endif %} +Win10ActKMS: +#{% if status != 'True' %} + cmd.script: + - source: salt://win/repo-ng/Win10ActKMS/lic.bat + - name: "lic.bat" +# cmd.run +# - name: 'cscript.exe "%systemroot%\system32\slmgr.vbs" /ipk "NW6C2-QMPVW-D7KKK-3GKT6-VCFB2"' +# - name: 'cscript.exe "%systemroot%\system32\slmgr.vbs" /skms 10.0.28.144:1688' +# - name: 'cscript.exe "%systemroot%\system32\slmgr.vbs" /ato' +#- name: 'shutdown -r -t 0' +#{% endif %} diff --git a/oss-pkg-Win10ActKMS.spec.in b/oss-pkg-Win10ActKMS.spec.in index 1526a58..3ef4849 100644 --- a/oss-pkg-Win10ActKMS.spec.in +++ b/oss-pkg-Win10ActKMS.spec.in @@ -36,8 +36,10 @@ Authors: %install +mkdir -p %{buildroot}/srv/salt/win/repo-ng/PACKAGE mkdir -p %{buildroot}/srv/salt/packages/ cp PACKAGE.sls %{buildroot}/srv/salt/packages/ +cp -a repo-ng/* %{buildroot}/srv/salt/win/repo-ng/PACKAGE %clean rm -rf %{buildroot} @@ -50,6 +52,8 @@ rm -rf %{buildroot} %files %defattr(644,root,root) +%dir /srv/salt/win/repo-ng/PACKAGE +%config(noreplace) /srv/salt/win/repo-ng/PACKAGE/lic.bat /srv/salt/packages/PACKAGE.sls diff --git a/repo-ng/lic.bat b/repo-ng/lic.bat new file mode 100644 index 0000000..bcb2477 --- /dev/null +++ b/repo-ng/lic.bat @@ -0,0 +1,5 @@ +@echo off +cscript.exe "%systemroot%\system32\slmgr.vbs" /ipk "NW6C2-QMPVW-D7KKK-3GKT6-VCFB2" +cscript.exe "%systemroot%\system32\slmgr.vbs" /skms <>:1688 +cscript.exe "%systemroot%\system32\slmgr.vbs" /ato +