summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_hacks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:14 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:26 +0100
commit0d5ff4ca7596790f853cf637e0fe225cad810a76 (patch)
tree360ca9a49f3d82d589a4b49c98e5210dfcb3b74e /helpers/lh_chroot_hacks
parentcd5110f6b8eb77519d704972276cfd5be6bff055 (diff)
downloadvyos-live-build-0d5ff4ca7596790f853cf637e0fe225cad810a76.tar.gz
vyos-live-build-0d5ff4ca7596790f853cf637e0fe225cad810a76.zip
Adding live-helper 1.0~a18-1.
Diffstat (limited to 'helpers/lh_chroot_hacks')
-rwxr-xr-xhelpers/lh_chroot_hacks22
1 files changed, 22 insertions, 0 deletions
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index 5a5e65056..38bcbbad4 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -83,10 +83,32 @@ esac
# Update initramfs
Chroot "update-initramfs -k all -t -u"
+# Remove build systems clock drift
+echo "0.0 0 0.0" > chroot/etc/adjtime
+
+# Remove generated xorg.conf based on build systems configuration
+rm -f chroot/etc/X11/xorg.conf
+
+# Touch resolv.conf
+touch chroot/etc/resolv.conf
+
+# Remove cruft
+rm -f chroot/boot/initrd*bak*
+rm -f /etc/apt/trusted.gpg~
+rm -f chroot/etc/group- chroot/etc/passwd-
+rm -f chroot/etc/gshadow- chroot/etc/shadow-
+rm -f chroot/var/cache/debconf/*-old
+rm -f chroot/var/lib/dpkg/*-old
+
if [ -n "${LH_ROOT_COMMAND}" ]
then
${LH_ROOT_COMMAND} chown -R --quiet `whoami`:`whoami` chroot
fi
+if [ -d chroot/home/${LIVE_USERNAME} ]
+then
+ chown -R --quiet 999:999 chroot/home/${LIVE_USERNAME}
+fi
+
# Creating stage file
Create_stagefile .stage/chroot_hacks