Updated WinPE sections

This commit is contained in:
2Shirt 2018-05-17 18:03:53 -06:00
parent 3114b72178
commit bec947262b
2 changed files with 13 additions and 7 deletions

View file

@ -32,7 +32,7 @@ def fix_path(path):
"""Replace invalid filename characters with underscores."""
return REGEX_BAD_PATH_NAMES.sub('_', path)
def prep_disk_for_backup(destination, disk, ticket_number):
def prep_disk_for_backup(destination, disk, backup_prefix):
"""Gather details about the disk and its partitions.
This includes partitions that can't be backed up,
@ -71,10 +71,10 @@ def prep_disk_for_backup(destination, disk, ticket_number):
par['Image Name'] = par['Name'] if par['Name'] else 'Unknown'
if 'IP' in destination:
par['Image Path'] = r'\\{}\{}\{}'.format(
destination['IP'], destination['Share'], ticket_number)
destination['IP'], destination['Share'], backup_prefix)
else:
par['Image Path'] = r'{}:\{}'.format(
ticket_number, destination['Letter'])
destination['Letter'], backup_prefix)
par['Image Path'] += r'\{}_{}.wim'.format(
par['Number'], par['Image Name'])
par['Image Path'] = fix_path(par['Image Path'])

View file

@ -75,10 +75,14 @@ def menu_backup():
}}
set_title('{}: Backup Menu'.format(KIT_NAME_FULL))
# Set ticket Number
# Set backup prefix
clear_screen()
print_standard('{}\n'.format(global_vars['Title']))
ticket_number = get_ticket_number()
if ENABLED_TICKET_NUMBERS:
backup_prefix = ticket_number
else:
backup_prefix = get_simple_string(prompt='Enter backup name prefix')
# Mount backup shares
mount_backup_shares(read_write=True)
@ -107,12 +111,13 @@ def menu_backup():
raise GenericAbort
# "Prep" disk
prep_disk_for_backup(destination, disk, ticket_number)
prep_disk_for_backup(destination, disk, dest_prefix)
# Display details for backup task
clear_screen()
print_info('Create Backup - Details:\n')
show_data(message='Ticket:', data=ticket_number)
if ENABLED_TICKET_NUMBERS:
show_data(message='Ticket:', data=ticket_number)
show_data(
message = 'Source:',
data = '[{}] ({}) {} {}'.format(
@ -293,7 +298,8 @@ def menu_setup():
# Display details for setup task
clear_screen()
print_info('Setup Windows - Details:\n')
show_data(message='Ticket:', data=ticket_number)
if ENABLED_TICKET_NUMBERS:
show_data(message='Ticket:', data=ticket_number)
show_data(message='Installing:', data=windows_version['Name'])
show_data(
message = 'Boot Method:',