Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
a711740d
Commit
a711740d
authored
Nov 14, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntp: #1256
parent
b74970ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
system.inc
src/etc/inc/system.inc
+12
-3
rc.bootup
src/etc/rc.bootup
+1
-13
No files found.
src/etc/inc/system.inc
View file @
a711740d
...
...
@@ -1500,7 +1500,7 @@ function system_ntp_setup_pps($serialport)
return
true
;
}
function
system_ntp_configure
(
$start_ntpd
=
true
)
function
system_ntp_configure
(
$start_ntpd
=
true
,
$verbose
=
false
)
{
global
$config
;
...
...
@@ -1513,6 +1513,11 @@ function system_ntp_configure($start_ntpd = true)
return
;
}
if
(
$verbose
)
{
echo
'Starting NTP service...'
;
flush
();
}
$driftfile
=
'/var/db/ntpd.drift'
;
$statsdir
=
'/var/log/ntp'
;
$gps_device
=
'/dev/gps0'
;
...
...
@@ -1758,6 +1763,9 @@ function system_ntp_configure($start_ntpd = true)
if
(
!
$start_ntpd
)
{
/* write out the config and delay startup */
mwexec_bg
(
'/usr/local/sbin/ntpdate_sync_once.sh'
);
if
(
$verbose
)
{
echo
"deferred.
\n
"
;
}
return
;
}
...
...
@@ -1770,8 +1778,9 @@ function system_ntp_configure($start_ntpd = true)
array
(
'/var/etc/ntpd.conf'
,
'/var/run/ntpd.pid'
)
);
// Note that we are starting up
log_error
(
"NTPD is starting up."
);
if
(
$verbose
)
{
echo
"done.
\n
"
;
}
}
function
system_halt
(
$sync
=
false
)
...
...
src/etc/rc.bootup
View file @
a711740d
...
...
@@ -179,23 +179,11 @@ echo "Configuring CRON...";
configure_cron
();
echo
"done.
\n
"
;
/* set up static routes */
system_routing_configure
();
/* enable routing */
system_routing_enable
();
/* start dnsmasq service */
services_dnsmasq_configure
(
true
);
/* start unbound service */
services_unbound_configure
(
true
);
/* Do an initial time sync */
echo
"Starting NTP time client..."
;
system_ntp_configure
(
false
);
echo
"done.
\n
"
;
system_ntp_configure
(
false
,
true
);
services_dhcpd_configure
(
'all'
,
array
(),
true
);
services_dhcpleases_configure
();
services_dhcrelay_configure
(
true
);
...
...
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