Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
1b5de95b
Commit
1b5de95b
authored
Jun 25, 2019
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rootfs: redirect output from udhcpc to kernel log
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
5d8aeed8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
network
userspace/rootfs_override/etc/init.d/network
+4
-2
dhcp_extra_opt.sh
userspace/rootfs_override/wr/bin/dhcp_extra_opt.sh
+4
-0
No files found.
userspace/rootfs_override/etc/init.d/network
View file @
1b5de95b
...
@@ -91,5 +91,7 @@ fi
...
@@ -91,5 +91,7 @@ fi
# Try to get IP via dhcp if failed run dhcp client forever in background.
# 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.
# If no information how to get IP address is available use this option.
echo
"Using DHCP to get IP"
echo
"Using DHCP to get IP"
|
tee
$log_output
udhcpc
-b
-i
eth0
$DHCP_OPT_EXTRA
# 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
userspace/rootfs_override/wr/bin/dhcp_extra_opt.sh
View file @
1b5de95b
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
# udhcpc should get hostname the from DHCP server.
# udhcpc should get hostname the from DHCP server.
#
#
# check whether we got hostname from DHCP server
# check whether we got hostname from DHCP server
log_output
=
/dev/kmsg
exec
1>
$log_output
if
[
-n
"
$hostname
"
]
;
then
if
[
-n
"
$hostname
"
]
;
then
/bin/hostname
"
$hostname
"
/bin/hostname
"
$hostname
"
echo
"
$hostname
"
>
/etc/hostname
echo
"
$hostname
"
>
/etc/hostname
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment