Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177443437
D15987.1794411115.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D15987.1794411115.diff
View Options
Index: etc/rc.d/ntpd
===================================================================
--- etc/rc.d/ntpd
+++ etc/rc.d/ntpd
@@ -55,9 +55,27 @@
rm -f "${ntpd_chrootdir}/dev/clockctl"
( 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}
+ # For each ntpd cmdline option that takes a file or dir as an argument,
+ # create a symlink into the cage at the corresponding outside location.
+ # Silently ignore errors (there might be a readonly filesystem involved)
+ # since this is only a convenience and not required for operation.
+ set -- $rc_flags
+ while [ $# -gt 1 ]; do
+ case "$1" in
+ -c | --configfile | \
+ -f | --driftfile | \
+ -k | --keyfile | \
+ -l | --logfile | \
+ -s | --statsdir )
+ ln -fhs "${ntpd_chrootdir}/$2" "$2" 2>/dev/null || true
+ shift
+ ;;
+ esac
+ shift
+ done
+
# Change run_rc_commands()'s internal copy of $ntpd_flags
#
rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 11, 3:31 PM (8 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41661510
Default Alt Text
D15987.1794411115.diff (1 KB)
Attached To
Mode
D15987: Make inside<->outside chroot symlinks for all files on the ntpd command line
Attached
Detach File
Event Timeline