summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_hacks
diff options
context:
space:
mode:
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