Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109817278
D15987.id44423.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15987.id44423.diff
View Options
Index: etc/rc.d/ntpd
===================================================================
--- etc/rc.d/ntpd
+++ etc/rc.d/ntpd
@@ -55,9 +55,30 @@
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,
+ # if there isn't a file or symlink at that location already. 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 )
+ if [ ! -e "$2" ]; then
+ ln -fhs "${ntpd_chrootdir}/$2" "$2" 2>/dev/null
+ fi
+ 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
Mon, Feb 10, 10:17 PM (23 m, 14 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16584482
Default Alt Text
D15987.id44423.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
Log In to Comment