Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../../usr/sbin/sysconfig
Real path: /usr/sbin/sysconfig
Zurück
#!/usr/bin/python3.7 -Es import solaris.no_site_packages # # Copyright (c) 2011, 2023, Oracle and/or its affiliates. # import os import sys from solaris_install.getconsole import get_console, SERIAL_CONSOLE from solaris_install import Popen, CalledProcessError TTY = "/usr/bin/tty" DEV_CONSOLE = "/dev/console" DEV_VT = "/dev/vt/" # # Determine whether LC_MESSAGES environment variable needs to be set # or not. This must be done before the gettext.translation() call so the # correct localized messages are used. # # # First determine if sysconfig has been launched on console. # Take virtual consoles into account. # cmd = [TTY] try: p = Popen.check_call(cmd, stdout=Popen.STORE, stderr=Popen.PIPE, check_result=(Popen.STDERR_EMPTY, 0)) except CalledProcessError as err: # if tty fails, assume we are not on console. is_on_console = False else: terminal_device = p.stdout.strip().decode() if terminal_device == DEV_CONSOLE or terminal_device.startswith(DEV_VT): is_on_console = True else: is_on_console = False # # If running from a serial console or remotely (not on console), # translation will be enabled. # Otherwise, translation will be disabled by setting LC_MESSAGES to C. # if is_on_console and get_console() != SERIAL_CONSOLE: os.environ["LC_MESSAGES"] = "C" # # sysconfig module has to be imported after LC_MESSAGES # was set, since i18n service is initialized during import. # from solaris_install.sysconfig import main # noqa: E402 sys.exit(main())