From 668fa3ea28db0708ff1f25ff52f776ba9d2e8034 Mon Sep 17 00:00:00 2001 From: Dennis Trinks Date: Thu, 26 Apr 2012 23:37:55 +0200 Subject: [PATCH] replace config file with OPSI properties --- CLIENT_DATA/custom/openvpn.ini | 3 --- CLIENT_DATA/setup32.ins | 13 ++----------- OPSI/control | 15 ++++++++++++--- builder-product.cfg | 2 +- 4 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 CLIENT_DATA/custom/openvpn.ini diff --git a/CLIENT_DATA/custom/openvpn.ini b/CLIENT_DATA/custom/openvpn.ini deleted file mode 100644 index dfae284..0000000 --- a/CLIENT_DATA/custom/openvpn.ini +++ /dev/null @@ -1,3 +0,0 @@ -[Webserver] -URL = "http://opsi-dev.dtnet.de/opsi/openvpn" -defPW = "sECureIT" \ No newline at end of file diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index e25cdd4..9097fd7 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -30,8 +30,7 @@ Set $wget$ = "%SystemDrive%\Programme\GnuWin32\bin\wget.exe" Set $Ovpn-Config-Dir$ = "%SystemDrive%\Programme\OpenVPN\config" Set $Konfig-URL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL) -Set $defPW$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] defPW) -Set $pw$ = GetProductProperty ("webserver-password","values") +Set $pw$ = GetProductProperty ("htaccess-password","values") ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -76,10 +75,6 @@ else comment "Licensing required, reserve license and get license key" Sub_get_licensekey endif - - if $pw$ = "" - Set $pw$ = $defPW$ - endif comment "Start setup program" Winbatch_install @@ -118,11 +113,7 @@ endif "%ScriptPath%\reg_ndiwswan_bind.vbs" "%Scriptpath%\enable_rdp.vbs" -$wget$ -O $Ovpn-Config-Dir$\ca.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ca.crt -$wget$ -O $Ovpn-Config-Dir$\client.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.crt -$wget$ -O $Ovpn-Config-Dir$\client.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.key -$wget$ -O $Ovpn-Config-Dir$\client.ovpn --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.ovpn -$wget$ -O $Ovpn-Config-Dir$\ta.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ta.key +$wget$ -P $Ovpn-Config-Dir$ --http-user=%PCName% --password=$pw$ -r -R "index.html*" -nd -nH -np $Konfig-URL$/%PCName% cacls $Ovpn-Config-Dir$ /E /R Benutzer cacls $Ovpn-Config-Dir$ /E /R Hauptbenutzer diff --git a/OPSI/control b/OPSI/control index cf600cc..e3b1742 100644 --- a/OPSI/control +++ b/OPSI/control @@ -7,7 +7,7 @@ incremental: False type: localboot id: openvpn.config name: openvpn.config -description: Konfiguration OpenVPN und Registry Anpassungen +description: Configuration OpenVPN und registry customization advice: ADVICE version: VERSION priority: PRIORITY @@ -38,9 +38,18 @@ requirementType: before [ProductProperty] type: unicode -name: webserver-password +name: htaccess-password multivalue: False editable: True description: Password for downloading configfiles values: [""] -default: [""] \ No newline at end of file +default: ["secret"] + +[ProductProperty] +type: unicode +name: base-url +multivalue: False +editable: True +description: url for downloading configfiles, is extended by PCName in background +values: [""] +default: ["https://domain.com/openvpn"] \ No newline at end of file diff --git a/builder-product.cfg b/builder-product.cfg index ae74bb0..a65a073 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -6,7 +6,7 @@ PN="openvpn.config" VERSION="1" RELEASE="1" PRIORITY="0" -ADVICE="Pflichtfelder: apache-pw [Anmeldepasswort fuer download Konfigurationsdateien]" +ADVICE="base-url for downloading configfiles and htaccess-password must be filled out" # TYPE - defines, if the install files are public or restricted. # Valid value: restricted | public