Commit a43015c5 authored by Mike Hibler's avatar Mike Hibler
Browse files

Move ntp.drift file out of /etc and into /var/lib/ntp.

ntp tries to create a temporary file in the same dir when updating,
and that doesn't work with /etc.
parent ddb9bf13
......@@ -233,6 +233,23 @@ dolinux() {
# XXX Ugh...need to fix up our ntp.conf.
# It wants to create a temp file for ntp.drift in the same directory
# and ntp cannot write /etc, so move the drift file to /var/lib/ntp.
if [ -e "/mnt/etc/ntp.conf" -a -d "/mnt/var/lib/ntp" ]; then
echo " moving ntp.drift to /var/lib/ntp..."
if [ -e "/mnt/etc/ntp.drift" ]; then
mv /mnt/etc/ntp.drift /mnt/var/lib/ntp/
sed -i -e "s;/etc/ntp.drift;/var/lib/ntp/ntp.drift;" /mnt/etc/ntp.conf || {
echo "Failed to update /etc/ntp.conf"
umount $rootdev
return 1
# See if we need to trim the FS
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment