Commit 1b5de95b authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: redirect output from udhcpc to kernel log

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 5d8aeed8
......@@ -91,5 +91,7 @@ fi
# Try to get IP via dhcp if failed run dhcp client forever in background.
# If no information how to get IP address is available use this option.
echo "Using DHCP to get IP"
udhcpc -b -i eth0 $DHCP_OPT_EXTRA
echo "Using DHCP to get IP" | tee $log_output
# redirect output from udhcpc into syslog and output about the first lease to
# the kernel log (syslog is not started at this point)
udhcpc -S -b -i eth0 $DHCP_OPT_EXTRA | tee $log_output
......@@ -7,6 +7,10 @@
# udhcpc should get hostname the from DHCP server.
#
# check whether we got hostname from DHCP server
log_output=/dev/kmsg
exec 1>$log_output
if [ -n "$hostname" ]; then
/bin/hostname "$hostname"
echo "$hostname" > /etc/hostname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment