This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
2009-11-04 02:18:08 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
2010-04-19 21:16:01 +02:00
|
|
|
#include <ipxe/settings.h>
|
|
|
|
#include <ipxe/dhcp.h>
|
|
|
|
#include <ipxe/init.h>
|
|
|
|
#include <ipxe/sanboot.h>
|
2009-11-04 02:18:08 +01:00
|
|
|
#include <usr/autoboot.h>
|
|
|
|
|
|
|
|
struct setting keep_san_setting __setting = {
|
|
|
|
.name = "keep-san",
|
|
|
|
.description = "Preserve SAN connection",
|
|
|
|
.tag = DHCP_EB_KEEP_SAN,
|
|
|
|
.type = &setting_type_int8,
|
|
|
|
};
|
|
|
|
|
|
|
|
int keep_san ( void ) {
|
|
|
|
int keep_san;
|
|
|
|
|
|
|
|
keep_san = fetch_intz_setting ( NULL, &keep_san_setting );
|
|
|
|
if ( ! keep_san )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
printf ( "Preserving connection to SAN disk\n" );
|
|
|
|
shutdown_exit_flags |= SHUTDOWN_KEEP_DEVICES;
|
|
|
|
return 1;
|
|
|
|
}
|