From 89d711be2a59aba8ba2e6fd1c07bc1ee0d20fe55 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 8 Aug 2024 11:36:46 +0200 Subject: postinstall: ignore output when invoking legacy scripts output is never consumed. --- src/utils/postinstall.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/utils/postinstall.py b/src/utils/postinstall.py index e0bad71..65434af 100644 --- a/src/utils/postinstall.py +++ b/src/utils/postinstall.py @@ -99,7 +99,8 @@ def configure_os_custom(disk, partition): try: proc = subprocess.run(cmd_configure, - stdout=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, encoding='utf-8', shell=True, check=True) @@ -113,7 +114,8 @@ def windows_register_c_drive(disk, partition): try: proc = subprocess.run(cmd_configure, - stdout=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, encoding='utf-8', shell=True, check=True) @@ -126,7 +128,8 @@ def configure_mbr_boot_sector(disk, partition): try: proc = subprocess.run(cmd_configure, - stdout=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, encoding='utf-8', shell=True, check=True) @@ -139,7 +142,8 @@ def configure_grub_in_mbr(disk, partition): try: proc = subprocess.run(cmd_configure, - stdout=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, encoding='utf-8', shell=True, check=True) @@ -152,7 +156,8 @@ def configure_fstab(disk, partition): try: proc = subprocess.run(cmd_configure, - stdout=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, encoding='utf-8', shell=True, check=True) @@ -165,7 +170,8 @@ def install_grub(disk, partition): try: proc = subprocess.run(cmd_configure, - stdout=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, encoding='utf-8', shell=True, check=True) -- cgit v1.2.3-18-g5258