mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 01:47:32 +08:00
Print debug info
This commit is contained in:
parent
ed53b1adb4
commit
2c0c45457e
@ -66,6 +66,8 @@ configureDHCP() {
|
||||
|
||||
ip address flush "${VM_NET_TAP}"
|
||||
|
||||
{ set +x; } 2>/dev/null
|
||||
|
||||
TAP_NR=$(</sys/class/net/"${VM_NET_TAP}"/ifindex)
|
||||
TAP_PATH="/dev/tap${TAP_NR}"
|
||||
|
||||
@ -103,8 +105,6 @@ configureDHCP() {
|
||||
echo "docker setting to your container: --device=/dev/vhost-net" && exit 22
|
||||
fi
|
||||
|
||||
[ "$DEBUG" = "Y" ] && { set +x; } 2>/dev/null
|
||||
|
||||
# Store IP for Docker healthcheck
|
||||
echo "${DHCP_IP}" > "/var/dsm.ip"
|
||||
|
||||
@ -143,6 +143,8 @@ configureNAT () {
|
||||
iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill || true
|
||||
fi
|
||||
|
||||
{ set +x; } 2>/dev/null
|
||||
|
||||
#Check port forwarding flag
|
||||
if [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then
|
||||
{ sysctl -w net.ipv4.ip_forward=1 2> /dev/null ; rc=$?; } || :
|
||||
@ -192,10 +194,12 @@ configureNAT () {
|
||||
fi
|
||||
|
||||
DNSMASQ_OPTS=$(echo "$DNSMASQ_OPTS" | sed 's/\t/ /g' | tr -s ' ' | sed 's/^ *//')
|
||||
|
||||
[ "$DEBUG" = "Y" ] && set -x
|
||||
|
||||
$DNSMASQ ${DNSMASQ_OPTS:+ $DNSMASQ_OPTS}
|
||||
|
||||
[ "$DEBUG" = "Y" ] && { set +x; } 2>/dev/null
|
||||
{ set +x; } 2>/dev/null
|
||||
}
|
||||
|
||||
# ######################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user