From c526d2e7ee378e9ee5717b6afd0ce7e089b1d5c2 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Tue, 22 Oct 2024 05:13:23 -0500 Subject: [PATCH 1/4] Should attempt to get the cpu arch a bit more properly. --- lib/common/functions.sh | 2 +- packages/web/lib/fog/bootmenu.class.php | 8 ++++++++ packages/web/lib/fog/system.class.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/common/functions.sh b/lib/common/functions.sh index d8753008af..7677de22c3 100755 --- a/lib/common/functions.sh +++ b/lib/common/functions.sh @@ -538,7 +538,7 @@ configureFTP() { configureDefaultiPXEfile() { dots 'Configuring default iPXE file' [[ -z $webroot ]] && webroot='/' - echo -e "#!ipxe\nset arch \${buildarch}\nparams\nparam mac0 \${net0/mac}\nparam arch \${arch}\nparam platform \${platform}\nparam product \${product}\nparam manufacturer \${product}\nparam ipxever \${version}\nparam filename \${filename}\nparam sysuuid \${uuid}\nisset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\nisset \${net2/mac} && param mac2 \${net2/mac} || goto bootme\n:bootme\nchain ${httpproto}://$ipaddress${webroot}service/ipxe/boot.php##params" > "$tftpdirdst/default.ipxe" + echo -e "#!ipxe\nset arch \${buildarch}\niseq \${arch} i386 && cpuid --ext 29 && set arch x86_64\nparams\nparam mac0 \${net0/mac}\nparam arch \${arch}\nparam platform \${platform}\nparam product \${product}\nparam manufacturer \${product}\nparam ipxever \${version}\nparam filename \${filename}\nparam sysuuid \${uuid}\nisset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\nisset \${net2/mac} && param mac2 \${net2/mac} || goto bootme\n:bootme\nchain ${httpproto}://$ipaddress${webroot}service/ipxe/boot.php##params" > "$tftpdirdst/default.ipxe" errorStat $? } configureTFTPandPXE() { diff --git a/packages/web/lib/fog/bootmenu.class.php b/packages/web/lib/fog/bootmenu.class.php index 73de02a486..b5e28d2c96 100644 --- a/packages/web/lib/fog/bootmenu.class.php +++ b/packages/web/lib/fog/bootmenu.class.php @@ -557,6 +557,7 @@ private function _chainBoot($debug = false, $shortCircuit = false) if (!(isset($this->_hiddenmenu) && $this->_hiddenmenu) || $shortCircuit) { $Send['chainnohide'] = array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'params', 'param mac0 ${net0/mac}', 'param arch ${arch}', @@ -582,6 +583,7 @@ private function _chainBoot($debug = false, $shortCircuit = false) ); $Send['chainhide'] = array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', "iseq \${platform} efi && set key 0x1b || set key $KSKey", "iseq \${platform} efi && set keyName ESC || " . "set keyName $KSName", @@ -739,6 +741,7 @@ public function delConf() { $Send['delconfirm'] = array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'params', 'prompt --key y Would you like to delete this host? (y/N): && goto deleteyes || goto deleteno', ':deleteyes', @@ -766,6 +769,7 @@ public function aprvConf() { $Send['aprvconfirm'] = array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'params', 'prompt --key y Would you like to approve this host? (y/N): && goto answeryes || goto answerno', ':answeryes', @@ -793,6 +797,7 @@ public function keyreg() { $Send['keyreg'] = array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'echo -n Please enter the product key : ', 'read key', 'params', @@ -847,6 +852,7 @@ public function sesscheck() 'clear sessname', 'sleep 3', 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'params', 'param mac0 ${net0/mac}', 'param arch ${arch}', @@ -872,6 +878,7 @@ public function sessjoin() { $Send['joinsession'] = array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'echo -n Please enter the session name to join > ', 'read sessname', 'params', @@ -1971,6 +1978,7 @@ public function printDefault() $Send['head'] = self::fastmerge( array( 'set arch ${buildarch}', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', 'goto get_console', ':console_set', ), diff --git a/packages/web/lib/fog/system.class.php b/packages/web/lib/fog/system.class.php index 2c3c741be7..7d5ee2764b 100644 --- a/packages/web/lib/fog/system.class.php +++ b/packages/web/lib/fog/system.class.php @@ -53,7 +53,7 @@ private static function _versionCompare() public function __construct() { self::_versionCompare(); - define('FOG_VERSION', '1.5.10.1622'); + define('FOG_VERSION', '1.5.10.1625'); define('FOG_SCHEMA', 273); define('FOG_BCACHE_VER', 141); define('FOG_CLIENT_VERSION', '0.13.0'); From c36a4c041e6310222bd9623755e699d10724304a Mon Sep 17 00:00:00 2001 From: geotsot Date: Tue, 22 Oct 2024 13:28:27 +0300 Subject: [PATCH 2/4] Update snapintaskcomplete_slack.event.php to include snapin name --- .../plugins/slack/events/snapintaskcomplete_slack.event.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php b/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php index 17fd40f1f3..f9997cd832 100755 --- a/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php +++ b/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php @@ -68,7 +68,8 @@ public function onEvent($event, $data) $args = array( 'channel' => $Token->get('name'), 'text' => sprintf( - 'The snapin has completed installation on %s with status code: %s', + 'The %s snapin has completed installation on %s with status code: %s', + $data['Snapin']->get('name'), $data['Host']->get('name'), $data['SnapinTask']->get('return') ) From 76caf12a900fab1e8061d77613d4a77a9c1ed023 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Tue, 22 Oct 2024 05:57:05 -0500 Subject: [PATCH 3/4] Just make sure tabs are configured --- packages/web/lib/fog/system.class.php | 2 +- .../slack/events/snapintaskcomplete_slack.event.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web/lib/fog/system.class.php b/packages/web/lib/fog/system.class.php index 7d5ee2764b..62b9d05972 100644 --- a/packages/web/lib/fog/system.class.php +++ b/packages/web/lib/fog/system.class.php @@ -53,7 +53,7 @@ private static function _versionCompare() public function __construct() { self::_versionCompare(); - define('FOG_VERSION', '1.5.10.1625'); + define('FOG_VERSION', '1.5.10.1628'); define('FOG_SCHEMA', 273); define('FOG_BCACHE_VER', 141); define('FOG_CLIENT_VERSION', '0.13.0'); diff --git a/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php b/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php index f9997cd832..874d0aaac5 100755 --- a/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php +++ b/packages/web/lib/plugins/slack/events/snapintaskcomplete_slack.event.php @@ -68,10 +68,10 @@ public function onEvent($event, $data) $args = array( 'channel' => $Token->get('name'), 'text' => sprintf( - 'The %s snapin has completed installation on %s with status code: %s', - $data['Snapin']->get('name'), - $data['Host']->get('name'), - $data['SnapinTask']->get('return') + 'The %s snapin has completed installation on %s with status code: %s', + $data['Snapin']->get('name'), + $data['Host']->get('name'), + $data['SnapinTask']->get('return') ) ); $Token->call('chat.postMessage', $args); From 32a04775b310ada76ea97a914526fb35547fc18b Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Tue, 22 Oct 2024 06:40:47 -0500 Subject: [PATCH 4/4] Should ensure we have an or path --- lib/common/functions.sh | 2 +- packages/web/lib/fog/bootmenu.class.php | 16 ++++++++-------- packages/web/lib/fog/system.class.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/common/functions.sh b/lib/common/functions.sh index 7677de22c3..bd0a3b0562 100755 --- a/lib/common/functions.sh +++ b/lib/common/functions.sh @@ -538,7 +538,7 @@ configureFTP() { configureDefaultiPXEfile() { dots 'Configuring default iPXE file' [[ -z $webroot ]] && webroot='/' - echo -e "#!ipxe\nset arch \${buildarch}\niseq \${arch} i386 && cpuid --ext 29 && set arch x86_64\nparams\nparam mac0 \${net0/mac}\nparam arch \${arch}\nparam platform \${platform}\nparam product \${product}\nparam manufacturer \${product}\nparam ipxever \${version}\nparam filename \${filename}\nparam sysuuid \${uuid}\nisset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\nisset \${net2/mac} && param mac2 \${net2/mac} || goto bootme\n:bootme\nchain ${httpproto}://$ipaddress${webroot}service/ipxe/boot.php##params" > "$tftpdirdst/default.ipxe" + echo -e "#!ipxe\nset arch \${buildarch}\niseq \${arch} i386 && cpuid --ext 29 && set arch x86_64 ||\nparams\nparam mac0 \${net0/mac}\nparam arch \${arch}\nparam platform \${platform}\nparam product \${product}\nparam manufacturer \${product}\nparam ipxever \${version}\nparam filename \${filename}\nparam sysuuid \${uuid}\nisset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\nisset \${net2/mac} && param mac2 \${net2/mac} || goto bootme\n:bootme\nchain ${httpproto}://$ipaddress${webroot}service/ipxe/boot.php##params" > "$tftpdirdst/default.ipxe" errorStat $? } configureTFTPandPXE() { diff --git a/packages/web/lib/fog/bootmenu.class.php b/packages/web/lib/fog/bootmenu.class.php index b5e28d2c96..589434e4d2 100644 --- a/packages/web/lib/fog/bootmenu.class.php +++ b/packages/web/lib/fog/bootmenu.class.php @@ -557,7 +557,7 @@ private function _chainBoot($debug = false, $shortCircuit = false) if (!(isset($this->_hiddenmenu) && $this->_hiddenmenu) || $shortCircuit) { $Send['chainnohide'] = array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'params', 'param mac0 ${net0/mac}', 'param arch ${arch}', @@ -583,7 +583,7 @@ private function _chainBoot($debug = false, $shortCircuit = false) ); $Send['chainhide'] = array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', "iseq \${platform} efi && set key 0x1b || set key $KSKey", "iseq \${platform} efi && set keyName ESC || " . "set keyName $KSName", @@ -741,7 +741,7 @@ public function delConf() { $Send['delconfirm'] = array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'params', 'prompt --key y Would you like to delete this host? (y/N): && goto deleteyes || goto deleteno', ':deleteyes', @@ -769,7 +769,7 @@ public function aprvConf() { $Send['aprvconfirm'] = array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'params', 'prompt --key y Would you like to approve this host? (y/N): && goto answeryes || goto answerno', ':answeryes', @@ -797,7 +797,7 @@ public function keyreg() { $Send['keyreg'] = array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'echo -n Please enter the product key : ', 'read key', 'params', @@ -852,7 +852,7 @@ public function sesscheck() 'clear sessname', 'sleep 3', 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'params', 'param mac0 ${net0/mac}', 'param arch ${arch}', @@ -878,7 +878,7 @@ public function sessjoin() { $Send['joinsession'] = array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'echo -n Please enter the session name to join > ', 'read sessname', 'params', @@ -1978,7 +1978,7 @@ public function printDefault() $Send['head'] = self::fastmerge( array( 'set arch ${buildarch}', - 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64', + 'iseq ${arch} i386 && cpuid --ext 29 && set arch x86_64 ||', 'goto get_console', ':console_set', ), diff --git a/packages/web/lib/fog/system.class.php b/packages/web/lib/fog/system.class.php index 62b9d05972..a0dd0a0d7d 100644 --- a/packages/web/lib/fog/system.class.php +++ b/packages/web/lib/fog/system.class.php @@ -53,7 +53,7 @@ private static function _versionCompare() public function __construct() { self::_versionCompare(); - define('FOG_VERSION', '1.5.10.1628'); + define('FOG_VERSION', '1.5.10.1629'); define('FOG_SCHEMA', 273); define('FOG_BCACHE_VER', 141); define('FOG_CLIENT_VERSION', '0.13.0');