summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/postinstall.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/postinstall.py b/src/utils/postinstall.py
index 65434af..6d6e60e 100644
--- a/src/utils/postinstall.py
+++ b/src/utils/postinstall.py
@@ -10,6 +10,7 @@ import subprocess
import shutil
import logging
import hivex
+import shlex
from src.log import OgError
from src.utils.bcd import update_bcd
from src.utils.probe import *
@@ -90,19 +91,19 @@ def set_linux_hostname(disk, partition, name):
def configure_os_custom(disk, partition):
- if not shutil.which('configureOsCustom'):
+ command_path = shutil.which('configureOsCustom')
+ if not command_path:
raise OgError('configureOsCustom not found')
logging.info(f'Found configureOsCustom script, invoking it...')
- cmd_configure = f"configureOsCustom {disk} {partition}"
+ cmd_configure = f"{command_path} {disk} {partition}"
try:
- proc = subprocess.run(cmd_configure,
+ proc = subprocess.run(shlex.split(cmd_configure),
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
encoding='utf-8',
- shell=True,
check=True)
out = proc.stdout
except OSError as e: