File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from archinstall .lib .command import SysCommand
22from archinstall .lib .exceptions import ServiceException , SysCallError
33from archinstall .lib .output import error
4- from archinstall .lib .utils .util import running_from_host
4+ from archinstall .lib .utils .util import running_from_iso
55
66
77def list_keyboard_languages () -> list [str ]:
@@ -80,7 +80,7 @@ def get_kb_layout() -> str:
8080
8181
8282def set_kb_layout (locale : str ) -> bool :
83- if running_from_host ():
83+ if not running_from_iso ():
8484 # Skip when running from host - no need to change host keymap
8585 # The target installation keymap is set via installer.set_keyboard_language()
8686 return True
Original file line number Diff line number Diff line change 55from archinstall .lib .output import FormattedOutput
66
77
8- def running_from_host () -> bool :
8+ def running_from_iso () -> bool :
99 """
10- Check if running from an installed system .
10+ Check if running from the archiso environment .
1111
12- Returns True if running from installed system (host mode) for host-to-target install .
13- Returns False if /run/archiso exists (ISO mode).
12+ Returns True if /run/archiso/airootfs is a mount point (ISO mode).
13+ Returns False if running from installed system (host mode) for host-to-target install .
1414 """
15- is_host = not Path ('/run/archiso' ).exists ()
16- return is_host
15+ return Path ('/run/archiso/airootfs' ).is_mount ()
1716
1817
1918def generate_password (length : int = 64 ) -> str :
Original file line number Diff line number Diff line change 1717from archinstall .lib .packages .util import check_version_upgrade
1818from archinstall .lib .pacman .pacman import Pacman
1919from archinstall .lib .translationhandler import tr
20- from archinstall .lib .utils .util import running_from_host
20+ from archinstall .lib .utils .util import running_from_iso
2121
2222
2323def _log_sys_info () -> None :
@@ -114,11 +114,10 @@ def run() -> int:
114114 info (text )
115115 time .sleep (3 )
116116
117- if running_from_host ():
118- # log which mode we are using
119- debug ('Running from Host (H2T Mode)...' )
120- else :
117+ if running_from_iso ():
121118 debug ('Running from ISO (Live Mode)...' )
119+ else :
120+ debug ('Running from Host (H2T Mode)...' )
122121
123122 mod_name = f'archinstall.scripts.{ script } '
124123 # by loading the module we'll automatically run the script
You can’t perform that action at this time.
0 commit comments