Commit 6f1f7cfc authored by Christopher Spinrath's avatar Christopher Spinrath
Browse files

rootfs_remaster: move simple copy ops to Makefile

parent fe3723be
...@@ -239,6 +239,16 @@ ifneq ($(strip $(APT_SOURCE_URL_OVERRIDE)),) ...@@ -239,6 +239,16 @@ ifneq ($(strip $(APT_SOURCE_URL_OVERRIDE)),)
echo "deb $(APT_SOURCE_URL_OVERRIDE) $(ISO_RELEASE)-updates main restricted universe multiverse" \ echo "deb $(APT_SOURCE_URL_OVERRIDE) $(ISO_RELEASE)-updates main restricted universe multiverse" \
>> "$(call archdir,$*)$(ROOTFS)/etc/apt/sources.list" >> "$(call archdir,$*)$(ROOTFS)/etc/apt/sources.list"
endif 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)" mkdir -p "$(call archdir,$*)$(LXC_DIR)"
lxc-execute --name "lipck_remaster_$*" -P "$(call archdir,$*)$(LXC_DIR)" -f "$(CURDIR)/config/lxc_common.conf" \ 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)" \ -s lxc.arch="$*" -s lxc.rootfs="$(call archdir,$*)$(ROOTFS)" \
...@@ -274,6 +284,8 @@ $(call gentargets,$(STATE_DIR)/rootfs_finalized) : $(call archdir,%)$(STATE_DIR) ...@@ -274,6 +284,8 @@ $(call gentargets,$(STATE_DIR)/rootfs_finalized) : $(call archdir,%)$(STATE_DIR)
$(RM) "$(call archdir,$*)$(ROOTFS)/etc/resolv.conf" $(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 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" $(RM) -r "$(call archdir,$*)$(ROOTFS)/remaster"
#clean up crash reports
$(RM) -rf "$(call archdir,$*)$(ROOTFS)/var/crash/"*
$(RM) "$(call archdir,$*)$(STATE_DIR)/rootfs_prepared" $(RM) "$(call archdir,$*)$(STATE_DIR)/rootfs_prepared"
touch "$(call archdir,$*)$(STATE_DIR)/rootfs_finalized" touch "$(call archdir,$*)$(STATE_DIR)/rootfs_finalized"
......
...@@ -98,9 +98,9 @@ function install_packages() ...@@ -98,9 +98,9 @@ function install_packages()
function finalize() function finalize()
{ {
echo -n "Europe/Berlin" > /etc/timezone #update initramfs - both this script and lipck may have changed files
#that should be copied over in the initramfs
rm -rf /var/crash/* update-initramfs -u
if [ -z "$LIPCK_HAS_APT_CACHE" ] if [ -z "$LIPCK_HAS_APT_CACHE" ]
then then
...@@ -108,23 +108,6 @@ function finalize() ...@@ -108,23 +108,6 @@ function finalize()
fi 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() function hold_packages()
{ {
for PKG in $@; do for PKG in $@; do
...@@ -146,12 +129,8 @@ PKGS_TO_HOLD=$(get_packages_from_file "$CONTRIB_DIR/hold_packages") ...@@ -146,12 +129,8 @@ PKGS_TO_HOLD=$(get_packages_from_file "$CONTRIB_DIR/hold_packages")
hold_packages $PKGS_TO_HOLD hold_packages $PKGS_TO_HOLD
prepare_install prepare_install
copy_modprobe_d
copy_sysctl_d
install_packages install_packages
install_kde_defaults
#i.e. required for applying default-wallpaper patch #i.e. required for applying default-wallpaper patch
#echo "compiling glib2 schemas..." #echo "compiling glib2 schemas..."
#glib-compile-schemas /usr/share/glib-2.0/schemas #glib-compile-schemas /usr/share/glib-2.0/schemas
......
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