aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2018-06-28 22:05:29 +0000
committerIan Lepore <ian@FreeBSD.org>2018-06-28 22:05:29 +0000
commitb5a278bcf42f0e68091ced7082c003656f374646 (patch)
treec106fbc24c599ba9aee120ae2869d4259b4902ad /etc/rc.d
parenta0d30ad6a1a0ccb2c6764347b1ffbff741f41cd9 (diff)
downloadsrc-b5a278bcf42f0e68091ced7082c003656f374646.tar.gz
src-b5a278bcf42f0e68091ced7082c003656f374646.zip
Rename variable ntp_tmp_leapfile to have a leading underbar, to distinguish
it from variables with similar names which are set in rc.conf. This will make more sense as the script grows more similar-name local variables in some upcoming changes.
Notes
Notes: svn path=/head/; revision=335786
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/ntpd12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd
index 3d3c144373ca..efc25982f9ca 100755
--- a/etc/rc.d/ntpd
+++ b/etc/rc.d/ntpd
@@ -20,7 +20,7 @@ fetch_cmd="ntpd_fetch_leapfile"
needfetch_cmd="ntpd_needfetch_leapfile"
start_precmd="ntpd_precmd"
-ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list"
+_ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list"
load_rc_config $name
@@ -56,7 +56,7 @@ ntpd_precmd()
( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" )
fi
ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift
- ln -fs "${ntpd_chrootdir}${ntp_tmp_leapfile}" ${ntp_tmp_leapfile}
+ ln -fs "${ntpd_chrootdir}${_ntp_tmp_leapfile}" ${_ntp_tmp_leapfile}
# Change run_rc_commands()'s internal copy of $ntpd_flags
#
@@ -140,15 +140,15 @@ ntpd_fetch_leapfile() {
if ntpd_needfetch_leapfile ; then
for url in $ntp_leapfile_sources ; do
$verbose fetching $url
- fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $url && break
+ fetch $ntp_leapfile_fetch_opts -o $_ntp_tmp_leapfile $url && break
done
- ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile)
- ntp_expiry_tmp=$(get_ntp_leapfile_expiry $ntp_tmp_leapfile)
+ ntp_ver_no_tmp=$(get_ntp_leapfile_ver $_ntp_tmp_leapfile)
+ ntp_expiry_tmp=$(get_ntp_leapfile_expiry $_ntp_tmp_leapfile)
if [ "$ntp_expiry_tmp" -gt "$ntp_expiry_db" -o \
"$ntp_expiry_tmp" -eq "$ntp_expiry_db" -a \
"$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then
$verbose using $url as $ntp_db_leapfile
- mv -f $ntp_tmp_leapfile $ntp_db_leapfile ||
+ mv -f $_ntp_tmp_leapfile $ntp_db_leapfile ||
$verbose "warning: cannot replace $ntp_db_leapfile (read-only fs?)"
else
$verbose using existing $ntp_db_leapfile