1
0
mirror of https://github.com/rancher/os.git synced 2025-08-10 02:58:15 +00:00

make DHCP even debug print conditional on rancher.debug=true

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2017-09-12 20:56:19 +10:00
parent a97854e089
commit ab9f22a954

View File

@ -1,6 +1,8 @@
#!/bin/bash
echo "DHCPCD: $interface $reason" &>> /var/log/dhcpcd.debug.log
echo "$(date)" &>> /var/log/dhcpcd.debug.log
set | sed -ne 's/^new_//p' | sort &>> /var/log/dhcpcd.debug.log
echo "--------------------------" &>> /var/log/dhcpcd.debug.log
if [ "$(ros config get rancher.debug)" == "true" ]; then
echo "DHCPCD: $interface $reason" &>> /var/log/dhcpcd.debug.log
echo "$(date)" &>> /var/log/dhcpcd.debug.log
set | sed -ne 's/^new_//p' | sort &>> /var/log/dhcpcd.debug.log
echo "--------------------------" &>> /var/log/dhcpcd.debug.log
fi