Initial Commit

master
Lino Jorzick 3 years ago
commit 9fa0e7636f

6
.gitignore vendored

@ -0,0 +1,6 @@
debian/gruelag-hppdg6-uefi-conf/*
debian/gruelag-hppdg6-uefi-conf.substvars
debian/gruelag-hppdg6-uefi-conf.debhelper.log
debian/files
debian/debhelper-build-stamp
debian/*.debhelper

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Felix Jacobi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,138 @@
[Product]
type: localboot
id: gruelag-hppdg6-uefi-conf
name: Gruelag HP Prodesk G6 UEFI Konfiguration
description: Mit diesem Paket werden grundsätzliche Systemparameter (BIOS-Settings) für die HP-Rechner gesetzt.
advice:
version: 1.0
packageVersion: 1.5
setupScript: install.ins
[ProductProperty]
name: propplaceholder
description: Property-Tag Platzhalter
default: SCHULE
[ProductProperty]
name: oldpw
description: BIOS-Kennwort (bisher)
default:
[ProductProperty]
name: newpw
description: BIOS-Kennwort (neu)
default:
[ProductProperty]
name: uefibootorder
description: UEFI Boot Order (z.B. HDD:M.2:1,HDD:USB:1,NETWORK IPV4:EMBEDDED:1,NETWORK IPV6:EMBEDDED:1)
default: ["HDD:M.2:1,NETWORK IPV4:EMBEDDED:1"]
[ProductProperty]
name: language
description: BIOS-Sprache
editable: false
values: ["English", "Deutsch"]
default: ["English"]
[ProductProperty]
name: keyboardlayout
description: Tastaturlayout
editable: false
values: ["English", "Deutsch"]
default: ["Deutsch"]
[ProductProperty]
name: pxeboot
description: Network (PXE) Boot
editable: false
values: ["Enable", "Disable"]
default: ["Enable"]
[ProductProperty]
name: ipv6pxeboot
description: IPv6 during UEFI Boot
editable: false
values: ["Enable", "Disable"]
default: ["Disable"]
[ProductProperty]
name: restrictusb
description: Restrict USB Devices
editable: false
values: ["Allow all USB Devices", "Allow only keyboard and mouse", "Allow all but storage devices and hubs"]
default: ["Allow all USB Devices"]
[ProductProperty]
name: modponpw
description: Allow User to Modify Power-on Password
editable: false
values: ["No", "Change Only", "Change or Delete"]
default: ["No"]
[ProductProperty]
name: passforbootmn
description: Prompt for Admin authentication on F9 (Boot Menu)
editable: false
values: ["Enable", "Disable"]
default: ["Enable"]
[ProductProperty]
name: passforrecover
description: Prompt for Admin authentication on F11 (System Recovery)
editable: false
values: ["Enable", "Disable"]
default: ["Enable"]
[ProductProperty]
name: passforpxe
description: Prompt for Admin authentication on F12 (Network Boot)
editable: false
values: ["Enable", "Disable"]
default: ["Enable"]
[ProductProperty]
name: intspkr
description: Internal Speakers
editable: false
values: ["Enable", "Disable"]
default: ["Enable"]
[ProductProperty]
name: secureboot
description: Secure Boot
editable: false
values: ["Enable", "Disable"]
default: ["Disable"]
[ProductProperty]
name: wakeonlan
description: Wake On LAN
editable: false
values: ["Disabled", "Boot to Network", "Boot to Hard Drive", "Boot to Normal Boot Order"]
default: ["Boot to Network"]
[ProductProperty]
name: wakeonlanpw
description: Wake on LAN Power-on Password Policy
editable: false
values: ["Bypass Password", "Require Password"]
default: ["Bypass Password"]

18
debian/control vendored

@ -0,0 +1,18 @@
Source: winst-gruelag-hppdg6-uefi-conf
Section: misc
Priority: optional
Maintainer: Gruelag GmbH <buero@gruelag.de>
Build-Depends: debhelper-compat (= 13),
dh-sequence-iserv,
dh-sequence-iserv-winst,
Standards-Version: 4.4.1
Homepage: https://www.gruelag.de
Rules-Requires-Root: no
Package: winst-gruelag-hppdg6-uefi-conf
Architecture: all
Depends: ${misc:Depends},
${perl:Depends},
${iserv:winst:Depends},
Description: ${iserv:winst:Description}
Tag: suite::iserv::deploy, role:package

29
debian/copyright vendored

@ -0,0 +1,29 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: winst-gruelag-hppdg6-uefi-conf
Files: *
Copyright: 2022 Gruelag GmbH <buero@gruelag.de>
License: MIT
Files: debian/*
Copyright: 2022 Gruelag GmbH <buero@gruelag.de>
License: MIT
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

4
debian/rules vendored

@ -0,0 +1,4 @@
#!/usr/bin/make -f
%:
dh $@

@ -0,0 +1 @@
3.0 (native)

@ -0,0 +1 @@
LICENSE* usr/share/doc/gruelag-hppdg6-uefi-conf

Binary file not shown.

@ -0,0 +1,140 @@
[Initial]
Message=Installiere HP UEFI Einstellungen...
DefVar $PropPlacehldr$
DefVar $Uefioldpw$
DefVar $Uefinewpw$
DefVar $Uefibootorder$
DefVar $Uefilanguage$
DefVar $Uefikeyboardlayout$
DefVar $Uefipxeboot$
DefVar $Uefiipv6pxeboot$
DefVar $Uefirestrictusb$
DefVar $Uefimodponpw$
DefVar $Uefipassforbootmn$
DefVar $Uefipassforrecover$
DefVar $Uefipassforpxe$
DefVar $Uefiintspkr$
DefVar $Uefisecureboot$
DefVar $Uefiwakeonlan$
DefVar $Uefiwakeonlanpw$
DefStringList $Result$
DefStringList $PowershellResult$
DefVar $Value$
DefVar $Hostname$
DefVar $Invnumber$
DefVar $ExitCode$
[Actions]
ShowBitmap "%ScriptPath%\logo.png" "HP ProDesk G6 UEFI-Settings"
Sub_GetProperties
Files_Copy
Sub_GetVars
Winbatch_setup /Sysnative
Sub_HandlePw
ExecWith_powershell "powershell.exe" -ExecutionPolicy Bypass
Sub_HandleFirstExitCode
Files_Cleanup
Sub_HandleExitCode
[Sub_GetProperties]
Set $PropPlacehldr$ = GetProductProperty("propplaceholder", "")
Set $Uefioldpw$ = GetProductProperty("oldpw", "")
Set $Uefinewpw$ = GetProductProperty("newpw", "")
Set $Uefibootorder$ = GetProductProperty("uefibootorder", "")
Set $Uefilanguage$ = GetProductProperty("language", "")
Set $Uefikeyboardlayout$ = GetProductProperty("keyboardlayout", "")
Set $Uefipxeboot$ = GetProductProperty("pxeboot", "")
Set $Uefiipv6pxeboot$ = GetProductProperty("ipv6pxeboot", "")
Set $Uefirestrictusb$ = GetProductProperty("restrictusb", "")
Set $Uefimodponpw$ = GetProductProperty("modponpw", "")
Set $Uefipassforbootmn$ = GetProductProperty("passforbootmn", "")
Set $Uefipassforrecover$ = GetProductProperty("passforrecover", "")
Set $Uefipassforpxe$ = GetProductProperty("passforpxe", "")
Set $Uefiintspkr$ = GetProductProperty("intspkr", "")
Set $Uefisecureboot$ = GetProductProperty("secureboot", "")
Set $Uefiwakeonlan$ = GetProductProperty("wakeonlan", "")
Set $Uefiwakeonlanpw$ = GetProductProperty("wakeonlanpw", "")
[Sub_GetVars]
Set $Result$ = GetReturnListFromSection("opsiservicecall_GetPcname")
Set $Hostname$ = TakeString("0", $Result$)
Set $Result$ = GetReturnListFromSection("opsiservicecall_GetInventoryNumber")
Set $Invnumber$ = TakeString("0", $Result$)
comment "Hostname is: " + $Hostname$
comment "Inventory Number is: " + $Invnumber$
[Winbatch_setup]
"%opsiTmpDir%\%installingProdName%\files\hp-cmsl-latest.exe" /silent
[Sub_HandlePw]
Set $PowershellResult$ = PowershellCall('Get-HPBIOSSetupPasswordIsSet')
Set $Value$ = TakeString("0", $PowershellResult$)
comment "BIOS Password set?: " + $Value$
if ($Value$ = "True")
if not ($Uefioldpw$ = $Uefinewpw$)
PowershellCall('Clear-HPBIOSSetupPassword "'+$Uefioldpw$+'"')
PowershellCall('Set-HPBIOSSetupPassword "'+$Uefinewpw$+'"')
endif
else
PowershellCall('Set-HPBIOSSetupPassword "'+$Uefinewpw$+'"')
endif
[ExecWith_powershell]
Set-HPBIOSSettingValue "$Uefinewpw$" "UEFI Boot Order" "$Uefibootorder$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Select Language" "$Uefilanguage$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Select Keyboard Layout" "$Uefikeyboardlayout$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Network (PXE) Boot" "$Uefipxeboot$"
Set-HPBIOSSettingValue "$Uefinewpw$" "IPv6 during UEFI Boot" "$Uefiipv6pxeboot$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Restrict USB Devices" "$Uefirestrictusb$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Allow User to Modify Power-on Password" "$Uefimodponpw$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Prompt for Admin authentication on F9 (Boot Menu)" "$Uefipassforbootmn$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Prompt for Admin authentication on F11 (System Recovery)" "$Uefipassforrecover$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Prompt for Admin authentication on F12 (Network Boot)" "$Uefipassforpxe$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Internal Speakers" "$Uefiintspkr$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Secure Boot" "$Uefisecureboot$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Wake On LAN" "$Uefiwakeonlan$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Ownership Tag" "$PropPlacehldr$-$Hostname$"
Set-HPBIOSSettingValue "$Uefinewpw$" "Wake on LAN Power-on Password Policy" "$Uefiwakeonlanpw$"
[Files_Copy]
copy -s "\\iserv\deploy\install\%installingProdName%\files\*" "%opsiTmpDir%\%installingProdName%\files\"
[Files_Cleanup]
delete -sf "%opsiTmpDir%\%installingProdName%\"
[Sub_HandleFirstExitCode]
; check return code
Set $ExitCode$ = GetLastExitCode
; checking possible errors on first run
Switch $ExitCode$
Case "0"
comment "Looks good: setup program gives exitcode zero. Proceed."
EndCase
DefaultCase
comment "We can't handle this Exitcode here: " + $exitcode$
EndCase
EndSwitch
[Sub_HandleExitCode]
; check return code
Set $ExitCode$ = GetLastExitCode
comment "GetLastExitCode: " + $ExitCode$
if not($ExitCode$ = "0")
LogError "Fatal: setup returned exit code " + $ExitCode$
IsFatalError
endif
[opsiservicecall_GetPcname]
"method":"collect_wlan_mac_hostName"
"params":[]
[opsiservicecall_GetInventoryNumber]
"method":"collect_wlan_mac_inventoryNumber"
"params":[]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -0,0 +1,2 @@
# by design
gruelag-hppdg6-uefi-conf: extra-license-file usr/share/doc/gruelag-hppdg6-uefi-conf/LICENSE
Loading…
Cancel
Save