add default gateway to deploy init script
Change-Id: Ia2aed772d811c44e0613bc0684b2ab2a58d36f86
This commit is contained in:
parent
a215ffcd92
commit
4c2c3a8738
@ -40,6 +40,7 @@ readonly BOOT_MAC_ADDRESS=$(echo "$_BOOTIF_" | sed -e "s/-/:/g" | sed -e "s/^01
|
|||||||
readonly BOOT_IP_ADDRESS=$(echo "$_IP_" | cut -d':' -f1)
|
readonly BOOT_IP_ADDRESS=$(echo "$_IP_" | cut -d':' -f1)
|
||||||
readonly BOOT_SERVER=$(echo "$_IP_" | cut -d':' -f2)
|
readonly BOOT_SERVER=$(echo "$_IP_" | cut -d':' -f2)
|
||||||
readonly BOOT_NETMASK=$(echo "$_IP_" | cut -d':' -f4)
|
readonly BOOT_NETMASK=$(echo "$_IP_" | cut -d':' -f4)
|
||||||
|
readonly BOOT_GATEWAY=$(echo "$_IP_" | cut -d':' -f3)
|
||||||
|
|
||||||
readonly DISK=$(get_kernel_parameter disk)
|
readonly DISK=$(get_kernel_parameter disk)
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ if [ $? -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
ifconfig "$BOOT_INTERFACE" "$BOOT_IP_ADDRESS" netmask "$BOOT_NETMASK"
|
ifconfig "$BOOT_INTERFACE" "$BOOT_IP_ADDRESS" netmask "$BOOT_NETMASK"
|
||||||
|
route add default gw $BOOT_GATEWAY
|
||||||
|
|
||||||
echo "pinging to boot server $BOOT_SERVER"
|
echo "pinging to boot server $BOOT_SERVER"
|
||||||
w=30
|
w=30
|
||||||
|
Loading…
Reference in New Issue
Block a user