Changeset 1687:b56d47159e55

Show
Ignore:
Timestamp:
07/01/08 13:17:47 (3 months ago)
Author:
klai@…
Branch:
default
Message:

Make booting more robust when kernel and/or initrd could be missing

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Tycoon/Virtualization/XenUtil.py

    r1670 r1687  
    250250        if not os.path.exists(account['kernel']): 
    251251            account['kernel'] = self.__default_kernel_path 
    252             OSUtil.modify_append( 
    253                 config_file, re.compile("^kernel = .*$"),  
    254                 'kernel = "%s"' % account['kernel']) 
     252 
     253        if not os.path.exists(account['initrd']): 
    255254            account['initrd'] = self.__default_initrd_path 
    256             OSUtil.modify_append( 
    257                 config_file, re.compile("^ramdisk = .*$"),  
    258                 'ramdisk = "%s"' % account['initrd']) 
     255 
     256        OSUtil.modify_append( 
     257            config_file, re.compile("^kernel = .*$"),  
     258            'kernel = "%s"' % account['kernel']) 
     259        OSUtil.modify_append( 
     260            config_file, re.compile("^ramdisk = .*$"),  
     261            'ramdisk = "%s"' % account['initrd']) 
    259262         
    260263        # Boot the VM