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
83
Issues
83
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
535b82a8
Commit
535b82a8
authored
Jun 06, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace: add S70wrdate to prime counters
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
72c57404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
S70wr_date
userspace/rootfs_override/etc/init.d/S70wr_date
+18
-0
No files found.
userspace/rootfs_override/etc/init.d/S70wr_date
0 → 100755
View file @
535b82a8
#!/bin/sh
F
=
/wr/etc/wr_date.conf
# if there is no config file, do nothing.
test
-f
$F
||
exit
0
# pick the first server, if any
S
=
$(
grep
'ntpserver'
$F
|
sed
's/ntpserver//'
|
head
-n
1
)
# if none, exit
text
-z
"
$D
"
&&
exit
0
# pick busybox ntpd explicitly, to avoid real ntpd instances
echo
"Setting host time using ntpd"
busybox ntpd
-n
-q
-p
$S
echo
"Setting WR time from host time"
/wr/bin/wr_date
set
host
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