diff --git a/Makefile b/Makefile index 16ca97e4804462ce9273008774703cf983df2b62..c1270752b18243d5f00645dcce245a52f24c5b79 100644 --- a/Makefile +++ b/Makefile @@ -239,6 +239,16 @@ ifneq ($(strip $(APT_SOURCE_URL_OVERRIDE)),) echo "deb $(APT_SOURCE_URL_OVERRIDE) $(ISO_RELEASE)-updates main restricted universe multiverse" \ >> "$(call archdir,$*)$(ROOTFS)/etc/apt/sources.list" endif + #set timezone + echo -n "Europe/Berlin" > "$(call archdir,$*)$(ROOTFS)/etc/timezone" + #install kde defaults + mkdir -p "$(call archdir,$*)$(ROOTFS)/etc/skel/.kde/share/config/" + cp "$(CURDIR)/contrib/rootfs/kde_config/"* "$(call archdir,$*)$(ROOTFS)/etc/skel/.kde/share/config/" + #install modprobe.d files + cp "$(CURDIR)/contrib/rootfs/modprobe.d/"* "$(call archdir,$*)$(ROOTFS)/etc/modprobe.d/" + #install sysctl.d files + cp "$(CURDIR)/contrib/rootfs/sysctl.d/"* "$(call archdir,$*)$(ROOTFS)/etc/sysctl.d/" + mkdir -p "$(call archdir,$*)$(LXC_DIR)" lxc-execute --name "lipck_remaster_$*" -P "$(call archdir,$*)$(LXC_DIR)" -f "$(CURDIR)/config/lxc_common.conf" \ -s lxc.arch="$*" -s lxc.rootfs="$(call archdir,$*)$(ROOTFS)" \ @@ -274,6 +284,8 @@ $(call gentargets,$(STATE_DIR)/rootfs_finalized) : $(call archdir,%)$(STATE_DIR) $(RM) "$(call archdir,$*)$(ROOTFS)/etc/resolv.conf" if [ -e "$(call archdir,$*)$(ROOTFS)/etc/resolv.conf.bak" ]; then mv "$(call archdir,$*)$(ROOTFS)/etc/resolv.conf.bak" "$(call archdir,$*)$(ROOTFS)/etc/resolv.conf"; fi $(RM) -r "$(call archdir,$*)$(ROOTFS)/remaster" + #clean up crash reports + $(RM) -rf "$(call archdir,$*)$(ROOTFS)/var/crash/"* $(RM) "$(call archdir,$*)$(STATE_DIR)/rootfs_prepared" touch "$(call archdir,$*)$(STATE_DIR)/rootfs_finalized" diff --git a/scripts/rootfs_remaster.sh b/scripts/rootfs_remaster.sh index 5406f921fa8e23c25ef7225e9455ec7a0c49281b..b776b2bf55ccdbc6bab4cea3ac26258b8ce45ffa 100755 --- a/scripts/rootfs_remaster.sh +++ b/scripts/rootfs_remaster.sh @@ -98,9 +98,9 @@ function install_packages() function finalize() { - echo -n "Europe/Berlin" > /etc/timezone - - rm -rf /var/crash/* + #update initramfs - both this script and lipck may have changed files + #that should be copied over in the initramfs + update-initramfs -u if [ -z "$LIPCK_HAS_APT_CACHE" ] then @@ -108,23 +108,6 @@ function finalize() fi } -function install_kde_defaults() -{ - mkdir -p /etc/skel/.kde/share/config/ - cp "$CONTRIB_DIR/kde_config/"* /etc/skel/.kde/share/config/ -} - -function copy_modprobe_d() -{ - cp "$SCRIPT_DIR/contrib/modprobe.d/"* "/etc/modprobe.d/" - update-initramfs -u -} - -function copy_sysctl_d() -{ - cp "$SCRIPT_DIR/contrib/sysctl.d/"* "/etc/sysctl.d/" -} - function hold_packages() { for PKG in $@; do @@ -146,12 +129,8 @@ PKGS_TO_HOLD=$(get_packages_from_file "$CONTRIB_DIR/hold_packages") hold_packages $PKGS_TO_HOLD prepare_install -copy_modprobe_d -copy_sysctl_d install_packages -install_kde_defaults - #i.e. required for applying default-wallpaper patch #echo "compiling glib2 schemas..." #glib-compile-schemas /usr/share/glib-2.0/schemas