index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2023-11-21 14:34:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 14:34:30 +0100 |
commit | cc806d9c4ce29212c2848c15b4b184feace3e1ac (patch) | |
tree | 28f4f1cb3b943d178a07a37369d3133093c51e17 /archinstall | |
parent | e6344f93f7e476d05bbcd642f2ed91fdde545870 (diff) |
-rw-r--r-- | archinstall/__init__.py | 3 | ||||
-rw-r--r-- | archinstall/scripts/list.py | 10 |
diff --git a/archinstall/__init__.py b/archinstall/__init__.py index b9a0c2fb..67230c71 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -1,6 +1,7 @@ """Arch Linux installer - guided, templates etc.""" import importlib import os +import sys import time import traceback from argparse import ArgumentParser, Namespace @@ -58,7 +59,7 @@ debug(f"Graphics devices detected: {SysInfo._graphics_devices().keys()}") # For support reasons, we'll log the disk layout pre installation to match against post-installation layout debug(f"Disk states before installing: {disk.disk_layouts()}") -if os.getuid() != 0: +if 'sphinx' not in sys.modules and os.getuid() != 0: print(_("Archinstall requires root privileges to run. See --help for more.")) exit(1) diff --git a/archinstall/scripts/list.py b/archinstall/scripts/list.py new file mode 100644 index 00000000..0e0363a1 --- /dev/null +++ b/archinstall/scripts/list.py @@ -0,0 +1,10 @@ +import glob +import pathlib + +print("The following are viable --script options:") + +for script in [pathlib.Path(x) for x in glob.glob(f"{pathlib.Path(__file__).parent}/*.py")]: + if script.stem in ['__init__', 'list']: + continue + + print(f" {script.stem}")
\ No newline at end of file |