2019-12-17 03:40:08 -05:00
|
|
|
import logging
|
|
|
|
##
|
2019-11-04 23:18:28 -05:00
|
|
|
try:
|
|
|
|
from . import constants
|
2019-12-17 03:40:08 -05:00
|
|
|
_has_constants = True
|
2019-11-04 23:18:28 -05:00
|
|
|
except ImportError:
|
|
|
|
from . import constants_fallback as constants
|
2019-12-17 03:40:08 -05:00
|
|
|
_has_constants = False
|
|
|
|
from . import log
|
2019-11-06 12:48:18 -05:00
|
|
|
from . import constants_fallback
|
2019-11-04 23:38:32 -05:00
|
|
|
from . import utils
|
2019-10-29 22:37:36 -04:00
|
|
|
from . import disk
|
|
|
|
from . import system
|
|
|
|
from . import config
|
|
|
|
from . import envsetup
|
|
|
|
from . import network
|
2020-01-10 08:39:28 -05:00
|
|
|
from . import software
|
2019-11-04 23:18:28 -05:00
|
|
|
|
|
|
|
|
2019-12-17 03:40:08 -05:00
|
|
|
_logger = logging.getLogger('AIF')
|
|
|
|
if not _has_constants:
|
|
|
|
_logger.warning('Could not import constants, so using constants_fallback as constants')
|
|
|
|
|
|
|
|
|
2019-09-30 22:08:37 -04:00
|
|
|
class AIF(object):
|
|
|
|
def __init__(self):
|
2019-11-30 01:05:20 -05:00
|
|
|
# Process:
|
|
|
|
# 0.) get config (already initialized at this point)
|
|
|
|
# 1.) run pre scripts*
|
|
|
|
# 2.) initialize all objects' classes
|
|
|
|
# 3.) disk ops = partition, mount*
|
|
|
|
# 3.) b.) "pivot" logging here. create <chroot>/root/aif/ and copy log to <chroot>/root/aif/aif.log, use that
|
|
|
|
# as new log file. copy over scripts.
|
|
|
|
# 4.) install base system*
|
|
|
|
# 4.) b.) other system.* tasks. locale(s), etc.*
|
|
|
|
# 5.) run pkg scripts*
|
|
|
|
# 6.) install kernel(?), pkg items*
|
|
|
|
# 6.) b.) remember to install the .packages items for each object
|
|
|
|
# 7.) write out confs and other object application methods*
|
|
|
|
# * = log but don't do anything for dryrun
|
2019-09-30 22:08:37 -04:00
|
|
|
pass
|