Lines 23-28
_ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list"
Link Here
|
23 |
_ntp_default_dir="/var/db/ntp" |
23 |
_ntp_default_dir="/var/db/ntp" |
24 |
_ntp_default_driftfile="${_ntp_default_dir}/ntpd.drift" |
24 |
_ntp_default_driftfile="${_ntp_default_dir}/ntpd.drift" |
25 |
_ntp_old_driftfile="/var/db/ntpd.drift" |
25 |
_ntp_old_driftfile="/var/db/ntpd.drift" |
|
|
26 |
_ntpd_user_arg="-u ntpd:ntpd" |
26 |
|
27 |
|
27 |
pidfile="${_ntp_default_dir}/${name}.pid" |
28 |
pidfile="${_ntp_default_dir}/${name}.pid" |
28 |
|
29 |
|
Lines 101-109
ntpd_precmd()
Link Here
|
101 |
# by the admin, we don't add the option. If the file exists in the old |
102 |
# by the admin, we don't add the option. If the file exists in the old |
102 |
# default location we use that, else we use the new default location. |
103 |
# default location we use that, else we use the new default location. |
103 |
if can_run_nonroot; then |
104 |
if can_run_nonroot; then |
104 |
_user="ntpd" |
|
|
105 |
driftopt="-f ${_ntp_default_driftfile}" |
105 |
driftopt="-f ${_ntp_default_driftfile}" |
106 |
elif grep -q "^[ \t]*driftfile" "${ntpd_config}" || |
106 |
elif [ -n "${ntpd_user}" ]; then |
|
|
107 |
_ntpd_user_arg="-u ${ntpd_user}" |
108 |
unset ntpd_user |
109 |
fi |
110 |
if grep -q "^[ \t]*driftfile" "${ntpd_config}" || |
107 |
[ -n "${rc_flags}" ] && |
111 |
[ -n "${rc_flags}" ] && |
108 |
( [ -z "${rc_flags##*-f*}" ] || |
112 |
( [ -z "${rc_flags##*-f*}" ] || |
109 |
[ -z "${rc_flags##*--driftfile*}" ] ); then |
113 |
[ -z "${rc_flags##*--driftfile*}" ] ); then |
Lines 115-121
ntpd_precmd()
Link Here
|
115 |
fi |
119 |
fi |
116 |
|
120 |
|
117 |
# Set command_args based on the various config vars. |
121 |
# Set command_args based on the various config vars. |
118 |
command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt}" |
122 |
command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt} ${_ntpd_user_arg}" |
119 |
if checkyesno ntpd_sync_on_start; then |
123 |
if checkyesno ntpd_sync_on_start; then |
120 |
command_args="${command_args} -g" |
124 |
command_args="${command_args} -g" |
121 |
fi |
125 |
fi |
122 |
- |
|
|