diff --git a/platforms/opsi/CLIENT_DATA/delsub3264.ins b/platforms/opsi/CLIENT_DATA/delsub3264.ins index e9b208579c4..cd0b3bda4a6 100644 --- a/platforms/opsi/CLIENT_DATA/delsub3264.ins +++ b/platforms/opsi/CLIENT_DATA/delsub3264.ins @@ -41,40 +41,11 @@ endif ;LinkFolder_uninstall [Winbatch_uninstall_32] -"$UninstallProgram32$" /S +"$UninstallProgram32$" /S $keep_config$ [Winbatch_uninstall_64] -"$UninstallProgram64$" /S - - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir32$\" - - -[Files_uninstall_64] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ +"$UninstallProgram64$" /S $keep_config$ [Sub_check_exitcode] comment "Test for installation success via exit code" diff --git a/platforms/opsi/CLIENT_DATA/setup3264.ins b/platforms/opsi/CLIENT_DATA/setup3264.ins index 628416240b8..17e274b7a35 100644 --- a/platforms/opsi/CLIENT_DATA/setup3264.ins +++ b/platforms/opsi/CLIENT_DATA/setup3264.ins @@ -12,6 +12,7 @@ DefVar $MsiId64$ DefVar $UninstallProgram64$ DefVar $LogDir$ DefVar $ProductId$ +DefVar $ProductName$ DefVar $ProductExe32$ DefVar $ProductExe64$ DefVar $MinimumSpace$ @@ -30,22 +31,16 @@ DefVar $filedaemon_client_address$ DefVar $director_name$ DefVar $director_address$ DefVar $director_password$ +DefVar $keep_config$ +DefVar $auto_config$ Set $INST_SystemType$ = GetSystemType Set $INST_architecture$ = GetProductProperty("install_architecture","system specific") -Set $filedaemon_full_name$ = GetProductProperty( "filedaemon_full_name", "" ) -Set $filedaemon_full_password$ = GetProductProperty( "filedaemon_full_password", "filedaemon_full_password" ) -Set $filedaemon_monitor_name$ = GetProductProperty( "filedaemon_monitor_name", "filedaemon_monitor_name" ) -Set $filedaemon_monitor_password$ = GetProductProperty( "filedaemon_monitor_password", "filedaemon_monitor_password" ) -Set $filedaemon_client_address$ = GetProductProperty( "filedaemon_client_address", "") -Set $director_name$ = GetProductProperty( "director_name", "director_name" ) -Set $director_address$ = GetProductProperty( "director_address", "director_address" ) -Set $director_password$ = GetProductProperty( "director_password", "director_password" ) - Set $LogDir$ = "%SystemDrive%\tmp" + ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- @@ -53,8 +48,8 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; therefore please: only lower letters, no umlauts, ; no white space use '-' as a seperator Set $ProductId$ = "winbareos" -Set $ProductExe32$ = "data\winbareos-12.4.4-32-bit-r510.4.exe" -Set $ProductExe64$ = "data\winbareos-12.4.4-64-bit-r510.4.exe" +Set $ProductExe32$ = "data\winbareos-12.4.4-32-bit-r512.1.exe" +Set $ProductExe64$ = "data\winbareos-12.4.4-64-bit-r512.1.exe" Set $MinimumSpace$ = "30 MB" ; the path were we find the product after the installation Set $InstallDir$ = "%ProgramFilesDir%\Bareos" @@ -68,8 +63,18 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) ; Stop process and set installation status to failed endif + +Set $auto_config$ = lower( GetProductProperty("auto_config", "true")) + +if $auto_config$ = "true" + set $ProductName$ = $ProductId$ + " (auto config)" +else + set $keep_config$ = "/SILENTKEEPCONFIG" + set $ProductName$ = $ProductId$ +endif + comment "Show product picture" -ShowBitmap "%ScriptPath%\logo.png" "Bareos" +ShowBitmap "%ScriptPath%\logo.png" $ProductName$ if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" @@ -78,16 +83,25 @@ endif comment "installing" +Set $filedaemon_full_password$ = GetProductProperty( "filedaemon_full_password", "filedaemon_full_password" ) +Set $filedaemon_monitor_password$ = GetProductProperty( "filedaemon_monitor_password", "filedaemon_monitor_password" ) +Set $director_name$ = GetProductProperty( "director_name", "director_name" ) +Set $director_address$ = GetProductProperty( "director_address", "director_address" ) +Set $director_password$ = GetProductProperty( "director_password", "director_password" ) + +Set $filedaemon_full_name$ = GetProductProperty( "filedaemon_full_name", "" ) if $filedaemon_full_name$ = "" set $filedaemon_full_name$ = "%HostID%-fd" opsiservicecall_set_product_property_filedaemon_full_name endif +Set $filedaemon_monitor_name$ = GetProductProperty( "filedaemon_monitor_name", "filedaemon_monitor_name" ) if $filedaemon_monitor_name$ = "" set $filedaemon_monitor_name$ = "%HostID%-mon" opsiservicecall_set_product_property_filedaemon_monitor_name endif +Set $filedaemon_client_address$ = GetProductProperty( "filedaemon_client_address", "") if $filedaemon_client_address$ = "" set $filedaemon_client_address$ = "%HostID%" opsiservicecall_set_product_property_filedaemon_client_address @@ -134,11 +148,11 @@ endif ; don't use " around argument, otherwise argument is ignored [Winbatch_install_32] -"%ScriptPath%\$ProductExe32$" /S /CLIENTNAME="$filedaemon_full_name$" /CLIENTPASSWORD="$filedaemon_full_password$" /DIRECTORNAME="$director_name$ /CLIENTADDRESS=$filedaemon_client_address$" /CLIENTMONITORPASSWORD="$filedaemon_monitor_password$" /DIRECTORADDRESS="$director_address$" /DIRECTORPASSWORD="$director_password$" /D=$InstallDir32$ +"%ScriptPath%\$ProductExe32$" /S $keep_config$ /CLIENTNAME="$filedaemon_full_name$" /CLIENTPASSWORD="$filedaemon_full_password$" /DIRECTORNAME="$director_name$ /CLIENTADDRESS=$filedaemon_client_address$" /CLIENTMONITORPASSWORD="$filedaemon_monitor_password$" /DIRECTORADDRESS="$director_address$" /DIRECTORPASSWORD="$director_password$" /D=$InstallDir32$ [Winbatch_install_64] -"%ScriptPath%\$ProductExe64$" /S /CLIENTNAME="$filedaemon_full_name$" /CLIENTPASSWORD="$filedaemon_full_password$" /DIRECTORNAME="$director_name$" /CLIENTADDRESS="$filedaemon_client_address$" /CLIENTMONITORPASSWORD="$filedaemon_monitor_password$" /DIRECTORADDRESS="$director_address$" /DIRECTORPASSWORD="$director_password$" /D=$InstallDir64$ +"%ScriptPath%\$ProductExe64$" /S $keep_config$ /CLIENTNAME="$filedaemon_full_name$" /CLIENTPASSWORD="$filedaemon_full_password$" /DIRECTORNAME="$director_name$" /CLIENTADDRESS="$filedaemon_client_address$" /CLIENTMONITORPASSWORD="$filedaemon_monitor_password$" /DIRECTORADDRESS="$director_address$" /DIRECTORPASSWORD="$director_password$" /D=$InstallDir64$ [opsiservicecall_set_product_property_filedaemon_full_name] @@ -169,58 +183,6 @@ endif ] -[Files_install_32] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Files_install_64] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - [Sub_check_exitcode] comment "Test for installation success via exit code" set $ExitCode$ = getLastExitCode diff --git a/platforms/opsi/CLIENT_DATA/uninstall3264.ins b/platforms/opsi/CLIENT_DATA/uninstall3264.ins index df323ed19f7..0845ee693c7 100644 --- a/platforms/opsi/CLIENT_DATA/uninstall3264.ins +++ b/platforms/opsi/CLIENT_DATA/uninstall3264.ins @@ -13,10 +13,13 @@ DefVar $UninstallProgram64$ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductId$ +DefVar $ProductName$ DefVar $InstallDir32$ DefVar $InstallDir64$ DefVar $LicenseRequired$ DefVar $LicensePool$ +DefVar $auto_config$ +DefVar $keep_config$ DefVar $INST_SystemType$ DefVar $INST_architecture$ @@ -32,13 +35,21 @@ Set $LogDir$ = "%SystemDrive%\tmp" Set $ProductId$ = "bareos" Set $InstallDir32$ = "%ProgramFiles32Dir%\Bareos" Set $InstallDir64$ = "%ProgramFiles64Dir%\Bareos" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ +;Set $LicenseRequired$ = "false" +;Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- +Set $auto_config$ = lower( GetProductProperty("auto_config", "true")) + +if $auto_config$ = "true" + set $ProductName$ = $ProductId$ + " (auto config)" +else + set $keep_config$ = "/SILENTKEEPCONFIG" + set $ProductName$ = $ProductId$ +endif comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\logo.png" $ProductId$ Message "Uninstalling " + $ProductId$ + " ..." @@ -47,21 +58,3 @@ if FileExists("%ScriptPath%\delsub3264.ins") Sub "%ScriptPath%\delsub3264.ins" endif -;if $LicenseRequired$ = "true" -; comment "Licensing required, free license used" -; Sub_free_license -;endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) diff --git a/platforms/opsi/OPSI/control b/platforms/opsi/OPSI/control index 1dbee315240..adb23132330 100644 --- a/platforms/opsi/OPSI/control +++ b/platforms/opsi/OPSI/control @@ -21,6 +21,15 @@ onceScript: customScript: userLoginScript: +[ProductProperty] +type: unicode +name: auto_config +multivalue: False +editable: False +description: if true, Bareos configuration gets generated from Opsi properties +values: ["false", "true"] +default: ["true"] + [ProductProperty] type: unicode name: filedaemon_full_name @@ -95,6 +104,9 @@ values: ["32 only", "64 only", "both", "system specific"] default: ["system specific"] [Changelog] +20130627, Daniel Neuberger + * added ProductProperty Update_KeepConfig + 20130215, Joerg Steffens * adapted to be build with http://build.opensuse.org