Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
1b5de95b
Commit
1b5de95b
authored
5 years ago
by
Adam Wujek
Browse files
Options
Downloads
Patches
Plain Diff
rootfs: redirect output from udhcpc to kernel log
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
5d8aeed8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/rootfs_override/etc/init.d/network
+4
-2
4 additions, 2 deletions
userspace/rootfs_override/etc/init.d/network
userspace/rootfs_override/wr/bin/dhcp_extra_opt.sh
+4
-0
4 additions, 0 deletions
userspace/rootfs_override/wr/bin/dhcp_extra_opt.sh
with
8 additions
and
2 deletions
userspace/rootfs_override/etc/init.d/network
+
4
−
2
View file @
1b5de95b
...
...
@@ -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
This diff is collapsed.
Click to expand it.
userspace/rootfs_override/wr/bin/dhcp_extra_opt.sh
+
4
−
0
View file @
1b5de95b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment