From d736e75ade7a4472aefb72af9036f86016adcb42 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 30 Sep 2021 17:44:30 +0200 Subject: [statistics] Adapt hw-data parsing to new json format for display --- .../serversetup-bwlp-ipxe/inc/localboot.inc.php | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'modules-available/serversetup-bwlp-ipxe') diff --git a/modules-available/serversetup-bwlp-ipxe/inc/localboot.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/localboot.inc.php index d4dd9516..2ce098e9 100644 --- a/modules-available/serversetup-bwlp-ipxe/inc/localboot.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/inc/localboot.inc.php @@ -17,30 +17,38 @@ chain -ar /tftp/sl-bios/lpxelinux.0', 'EFI' => [ 'EXIT' => 'set slx_exit 1 || exit 1', + 'SANBOOT' => 'imgfree || +console || +set filename \EFI\Boot\bootx64.efi || +set i:int32 0 || +:blubber +sanboot --no-describe --drive ${i} --filename ${filename} || +inc i +iseq ${i} 10 || goto blubber', 'COMBOOT' => 'set netX/209:string localboot.cfg || set netX/210:string http://${serverip}/tftp/sl-efi64/ || chain -ar /tftp/sl-efi64/syslinux.efi', ], ]; - public static function getDefault() + public static function getDefault(): array { - $ret = explode(',', Property::get(self::PROPERTY_KEY, 'SANBOOT,EXIT')); + $ret = explode(',', Property::get(self::PROPERTY_KEY, 'SANBOOT,SANBOOT')); if (empty($ret)) { - $ret = ['SANBOOT', 'EXIT']; + $ret = ['SANBOOT', 'SANBOOT']; } elseif (count($ret) < 2) { - $ret[] = 'EXIT'; + $ret[] = 'SANBOOT'; } - if (null === self::BOOT_METHODS['PCBIOS'][$ret[0]]) { + if (!isset(self::BOOT_METHODS['PCBIOS'][$ret[0]])) { $ret[0] = 'SANBOOT'; } - if (null === self::BOOT_METHODS['EFI'][$ret[1]]) { - $ret[1] = 'EXIT'; + if (!isset(self::BOOT_METHODS['EFI'][$ret[1]])) { + $ret[1] = 'SANBOOT'; } return ['PCBIOS' => $ret[0], 'EFI' => $ret[1]]; } - public static function setDefault($pcbios, $efi) + public static function setDefault(string $pcbios, string $efi) { Property::set(self::PROPERTY_KEY, "$pcbios,$efi"); } -- cgit v1.2.3-55-g7522