always load answers from a fixed path if it is present
This commit is contained in:
parent
6919e5ce68
commit
7b375d9d92
|
@ -15,9 +15,10 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
|
||||
from subiquitycore.i18n import *
|
||||
from subiquitycore.log import setup_logger
|
||||
|
@ -70,6 +71,8 @@ def parse_options(argv):
|
|||
|
||||
LOGDIR = "/var/log/installer/"
|
||||
|
||||
AUTO_ANSWERS_FILE = "/subiquity_config/answers.yaml"
|
||||
|
||||
def main():
|
||||
opts = parse_options(sys.argv[1:])
|
||||
global LOGDIR
|
||||
|
@ -89,6 +92,10 @@ def main():
|
|||
'Check {} for errors.'.format(LOGFILE))
|
||||
return 1
|
||||
|
||||
if opts.answers is None and os.path.exists(AUTO_ANSWERS_FILE):
|
||||
logger.debug("Autoloading answers from %s", AUTO_ANSWERS_FILE)
|
||||
opts.answers = AUTO_ANSWERS_FILE
|
||||
|
||||
ui = SubiquityUI()
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue