This file is indexed.

/usr/share/subiquity/console-conf-tui is in console-conf 0.0.29.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env python3
# Copyright 2015 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import argparse
import sys
import logging
import os
import signal
from subiquitycore.log import setup_logger
from subiquitycore import __version__ as VERSION
from console_conf.core import ConsoleConf
from subiquitycore.core import ApplicationError
from subiquitycore.ui.frame import SubiquityUI
from subiquitycore.utils import environment_check


# Does console-conf actually need any of this?
ENVIRONMENT = '''
checks:
    write:
        directory:
            - /tmp
    mount:
        directory:
            - /proc
            - /sys
'''

def parse_options(argv):
    parser = argparse.ArgumentParser(
        description='console-conf - Pre-Ownership Configuration for Ubuntu Core',
        prog='console-conf')
    parser.add_argument('--dry-run', action='store_true',
                        dest='dry_run',
                        help='menu-only, do not call installer function')
    parser.add_argument('--serial', action='store_true',
                        dest='run_on_serial',
                        help='Run the installer over serial console.')
    parser.add_argument('--machine-config', metavar='CONFIG',
                        dest='machine_config',
                        help="Don't Probe. Use probe data file")
    return parser.parse_args(argv)


LOGDIR = "/var/log/console-conf/"

def main():
    opts = parse_options(sys.argv[1:])
    global LOGDIR
    if opts.dry_run:
        LOGDIR = ".subiquity"
    LOGFILE = setup_logger(dir=LOGDIR)
    logger = logging.getLogger('console_conf')
    logger.info("Starting console-conf v{}".format(VERSION))
    logger.info("Arguments passed: {}".format(sys.argv))

    signal.signal(signal.SIGINT, signal.SIG_IGN)
    signal.signal(signal.SIGQUIT, signal.SIG_IGN)

    env_ok = environment_check(ENVIRONMENT)
    if env_ok is False and not opts.dry_run:
        print('Failed environment check.  '
              'Check {} for errors.'.format(LOGFILE))
        return 1

    ui = SubiquityUI()

    try:
        interface = ConsoleConf(ui, opts)
    except ApplicationError as e:
        logger.exception('Failed to load ConsoleConf interface')
        print(e)
        return 1

    interface.run()

if __name__ == '__main__':
    sys.exit(main())