summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-12-13 20:32:05 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:50:02 +0200
commitbd22f9c8648332f4533be4bf8fb65c0f922bf4ea (patch)
treec6762d730a47859e5b0cc6c6cf57dd6788689709
parente2e5636744687d28e0b4e6fdf6e1b98547db3507 (diff)
downloadvyos-live-build-bd22f9c8648332f4533be4bf8fb65c0f922bf4ea.tar.gz
vyos-live-build-bd22f9c8648332f4533be4bf8fb65c0f922bf4ea.zip
Updating removal of adjtime in a split out hook for wheezy.
-rwxr-xr-xfunctions/defaults.sh6
-rwxr-xr-xscripts/build/chroot_hacks3
-rwxr-xr-xshare/hooks/0120-remove-adjtime-configuration.chroot11
3 files changed, 15 insertions, 5 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index e6fe7c5c6..6e3a78097 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -610,7 +610,8 @@ Set_defaults ()
remove-python-py \
remove-udev-persistent-rules \
remove-linux-image-backups \
- remove-mdadm-configuration}"
+ remove-mdadm-configuration \
+ remote-adjtime-configuration}"
;;
kubuntu)
@@ -623,7 +624,8 @@ Set_defaults ()
remove-python-py \
remove-udev-persistent-rules \
remove-linux-image-backups \
- remove-mdadm-configuration}"
+ remove-mdadm-configuration \
+ remove-adjtime-configuration}"
;;
esac
diff --git a/scripts/build/chroot_hacks b/scripts/build/chroot_hacks
index f7d48ead1..7cea32ff5 100755
--- a/scripts/build/chroot_hacks
+++ b/scripts/build/chroot_hacks
@@ -196,9 +196,6 @@ esac
# people might do in local hooks, and there might be no initrds at all.
find chroot/boot -name 'initrd*' -print0 | xargs -r -0 chmod go+r
-# Remove build systems clock drift
-echo "0.0 0 0.0" > chroot/etc/adjtime
-
# Remove cruft
rm -f chroot/boot/initrd*bak*
rm -f chroot/etc/apt/trusted.gpg~
diff --git a/share/hooks/0120-remove-adjtime-configuration.chroot b/share/hooks/0120-remove-adjtime-configuration.chroot
new file mode 100755
index 000000000..7fe5bbd15
--- /dev/null
+++ b/share/hooks/0120-remove-adjtime-configuration.chroot
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# Reset generated file
+
+cat > /etc/adjtime << EOF
+0.0 0 0.0
+0
+UTC
+EOF