-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch.sh
29 lines (27 loc) · 1.86 KB
/
patch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
sed -i '/#define ETH_P_AOE/a \
#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */' ipxe/src/include/ipxe/if_ether.h
cat ipxe/src/include/ipxe/if_ether.h
sed -i '/#define ERRFILE_httpntlm/a \
#define ERRFILE_lldp ( ERRFILE_NET | 0x004b0000 )' ipxe/src/include/ipxe/errfile.h
#sed -i '/#define NET_PROTO_LACP/a \
#define NET_PROTO_LLDP /* LLDP protocol */' ipxe/src/config/general.h
cat ipxe/src/config/general.h
sed -i '$ a \
#ifdef NET_PROTO_LLDP\nREQUIRE_OBJECT ( lldp );\n#endif' ipxe/src/config/config_ethernet.c
cat ipxe/src/config/config_ethernet.c
sed -i '/#ifdef CERT_CMD/i \
#ifdef LLDP_CMD\nREQUIRE_OBJECT ( lldp_cmd );\n#endif' ipxe/src/config/config.c
sed -i '/#define SETTING_MISC/a \
#define SETTING_LLDP 19 /**< LLDP settings */' ipxe/src/include/ipxe/settings.h
cat ipxe/src/include/ipxe/settings.h
sed -i '/#define DHCP_EB_FEATURE_NFS/a \
#define DHCP_EB_FEATURE_LLDP 0x30 /**< LLDP protocol */' ipxe/src/include/ipxe/features.h
cat ipxe/src/include/ipxe/features.h
echo "#define NET_PROTO_LLDP /* LLDP protocol */" >> ipxe/src/config/local/general.h
echo "#define LLDP_CMD /* LLDP commands */" >> ipxe/src/config/local/general.h
echo "#define VLAN_CMD /* VLAN commands */" >> ipxe/src/config/local/general.h
echo "#define PING_CMD /* Ping command */" >> ipxe/src/config/local/general.h
echo "#define PCI_CMD /* PCI commands */" >> ipxe/src/config/local/general.h
echo "#define NSLOOKUP_CMD /* DNS resolving command */" >> ipxe/src/config/local/general.h
echo "#define CONSOLE_CMD" >> ipxe/src/config/local/general.h
echo "#define CONSOLE_FRAMEBUFFER" >> ipxe/src/config/local/console.h