From 8607aae1fe4854ab4a369bcd20fda46e76bfbcdd Mon Sep 17 00:00:00 2001 From: boffart <> Date: Fri, 22 Nov 2024 12:49:44 +0300 Subject: [PATCH] =?UTF-8?q?#837=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B=20parted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Core/System/PBXInstaller.php | 4 +--- src/Core/System/RootFS/sbin/pbx_firmware | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Core/System/PBXInstaller.php b/src/Core/System/PBXInstaller.php index cb45830b..fcbba279 100644 --- a/src/Core/System/PBXInstaller.php +++ b/src/Core/System/PBXInstaller.php @@ -234,9 +234,7 @@ private function convertDiscLayout():void } $echoPath = Util::which('echo'); $partedPath = Util::which('parted'); - $fixCommand = "echo Fix | $partedPath --script $disk print"; - exec($fixCommand); - $command = "$partedPath --script $disk print | grep 'Partition Table' | awk '{print $3}'"; + $command = "$partedPath --script $disk print 2>/dev/null | grep 'Partition Table' | awk '{print $3}'"; exec($command, $partitionTypeOutput, $partedStatus); if ($partedStatus !== 0 || empty($partitionTypeOutput)) { return; diff --git a/src/Core/System/RootFS/sbin/pbx_firmware b/src/Core/System/RootFS/sbin/pbx_firmware index d60a5c18..d7731a74 100644 --- a/src/Core/System/RootFS/sbin/pbx_firmware +++ b/src/Core/System/RootFS/sbin/pbx_firmware @@ -110,8 +110,7 @@ fi # Inform the user of the installation process if [ -r "${img_file}" ]; then if command -v gdisk > /dev/null 2>&1; then - echo Fix | /sbin/parted --script "$DISK" print >/dev/null 2>&1; - PARTITION_TYPE=$(/sbin/parted --script "$DISK" print | grep "Partition Table" | awk '{print $3}') + PARTITION_TYPE=$(/sbin/parted --script "$DISK" print 2>/dev/null | grep "Partition Table" | awk '{print $3}') echo " - Performing an action for the msdos section" if [ "$PARTITION_TYPE" == "msdos" ]; then echo -e "w\nY\n" | gdisk "/dev/${systemDevice}" > /dev/null 2>&1;