Changeset 1687:b56d47159e55
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1670
|
r1687
|
|
| 250 | 250 | if not os.path.exists(account['kernel']): |
| 251 | 251 | 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']): |
| 255 | 254 | 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']) |
| 259 | 262 | |
| 260 | 263 | # Boot the VM |