diff --git a/Makefile b/Makefile index 6be86913fee8b53f35466a45dcb758c06739a8c1..2aaa3efe668b01880ae33703bed1aa8867aa8862 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,12 @@ define getisoname = $(ISO_PREFIX)desktop-$(call altarch,$1).iso endef +#applies all patches in $1 to target directory $2 +define patch_all = +$(foreach p,$(wildcard $1/*),echo "Applying \"$1\" to \"$2\":" && \ + cat "$p" | patch -d"$2" -p1 && echo "done." && ) true +endef + CASPER_SOURCE_DIR=$(ISO_CONTENT)/casper INITRD_SOURCE=$(CASPER_SOURCE_DIR)/initrd.lz SQUASHFS_SOURCE=$(CASPER_SOURCE_DIR)/filesystem.squashfs @@ -176,8 +182,11 @@ $(call gentargets,$(STATE_DIR)/rootfs_remastered) : $(call archdir,%)$(STATE_DIR -s lxc.mount.entry="$(APT_CACHE_DIR) $(call archdir,$*)$(ROOTFS)/var/cache/apt/ none defaults,bind 0 0" \ -s lxc.mount.entry="none $(call archdir,$*)$(ROOTFS)/tmp tmpfs defaults 0 0" \ -s lxc.mount.entry="none $(call archdir,$*)$(ROOTFS)/run tmpfs defaults 0 0" \ - -- /bin/bash -l /remaster/remaster.proxy.sh /remaster/scripts/remaster_rootfs.sh + -- /bin/bash -l /remaster/remaster.proxy.sh /remaster/scripts/rootfs_remaster.sh $(MAKE) ARCH=$* rootfs_finalize + + #apply patches + $(call patch_all,$(CURDIR)/patches/rootfs,$(call archdir,$*)$(ROOTFS)) touch "$(call archdir,$*)$(STATE_DIR)/rootfs_remastered" rootfs_console : $(call archdir,$(ARCH))$(STATE_DIR)/rootfs_extracted | $(APT_CACHE_DIR) @@ -271,7 +280,31 @@ initrd_clean_both: initrd_remaster : $(ARCH_DIR)$(STATE_DIR)/initrd_remastered $(call gentargets,$(STATE_DIR)/initrd_remastered) : $(call archdir,%)$(STATE_DIR)/initrd_extracted $(call archdir,%)$(STATE_DIR)/rootfs_remastered - $(CURDIR)/scripts/remaster_initrd.sh "$(CURDIR)" "$(call archdir,$*)$(INITRD)" "$(call archdir,$*)$(ROOTFS)" + mkdir -p "$(call archdir,$*)$(INITRD)/lip" + + #nmtelekinese + mkdir -p "$(call archdir,$*)$(INITRD)/lip/nm" + cp "$(CURDIR)/contrib/initrd/nmtelekinese/nmtelekinese.desktop" "$(call archdir,$*)$(INITRD)/lip/nm" + cp "$(CURDIR)/contrib/initrd/nmtelekinese/nmtelekinese.py" "$(call archdir,$*)$(INITRD)/lip/nm" + cp "$(CURDIR)/contrib/initrd/nmtelekinese/26mopsmops" "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/" + chmod +x "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/26mopsmops" + + #liphook + cp "$(CURDIR)/contrib/initrd/initrd_hook/24liphook" "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/" + chmod +x "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/24liphook" + + $(RM) "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/ORDER" + find "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/" -type f \ + | xargs basename -a | grep -E "^[0-9]{2}" | sort | xargs -I{} \ + echo -e "/scripts/casper-bottom/{}\n[ -e /conf/param.conf ] && . /conf/param.conf" \ + >> "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/ORDER" + + #install new kernel modules + $(RM) -R "$(call archdir,$*)$(INITRD)/lib/modules/"* + cp -a "$(call archdir,$*)$(ROOTFS)/lib/modules/$(shell basename $$(readlink -f "$(call archdir,$*)$(ROOTFS)/vmlinuz") | cut -d'-' -f2-)" \ + "$(call archdir,$*)$(INITRD)/lib/modules" + + $(call patch_all,$(CURDIR)/patches/initrd,$(call archdir,$*)$(INITRD)) touch "$(call archdir,$*)$(STATE_DIR)/initrd_remastered" initrd_pack : $(ARCH_DIR)$(INITRD_TARGET) @@ -320,7 +353,7 @@ image_binary_files $(IMAGE_DIR)/.lipbinaries: image_git_pull $(IMAGE_BINARIES) touch "$(IMAGE_DIR)/.lipbinaries" image_remaster $(IMAGE_DIR)/.remastered: $(IMAGE_DIR)/.lipbinaries - $(CURDIR)/scripts/remaster_iso.sh "$(CURDIR)" "$(IMAGE_DIR)" + $(call patch_all,$(CURDIR)/patches/iso/,$(IMAGE_DIR)) touch "$(IMAGE_DIR)/.remastered" image_content: image_git_pull $(IMAGE_DIR)/.remastered $(IMAGE_DIR)/grub/lipinfo.cfg @@ -348,7 +381,7 @@ image : image_content repo_packages : $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(ARCH)) $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(PRIMARY_ARCH)) $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(SECONDARY_ARCH)) : $(REPO_ARCHIVE_DIR)/Packages.% : $(call archdir,$*)$(STATE_DIR)/rootfs_remastered | $(IMAGE_DIR) $(MAKE) ARCH=$(call to_arch,$*) rootfs_prepare - mkdir "$(call archdir,$*)$(ROOTFS)/cdrom" + mkdir -p "$(call archdir,$*)$(ROOTFS)/cdrom" 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="$(call to_arch,$*)" -s lxc.rootfs="$(call archdir,$*)$(ROOTFS)" \ @@ -357,7 +390,7 @@ $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(PRIMARY_ARCH)) $(REPO_ARCHIVE_DIR) -s lxc.mount.entry="none $(call archdir,$(ARCH))$(ROOTFS)/run tmpfs defaults 0 0" \ -s lxc.mount.entry="$(IMAGE_DIR) $(call archdir,$*)$(ROOTFS)/cdrom none defaults,bind 0 0" \ -- /bin/bash -l /remaster/remaster.proxy.sh \ - /remaster/scripts/fill_offline_repo.sh "$*" "/cdrom" + /remaster/scripts/repo_packages.sh "$*" "/cdrom" rmdir "$(call archdir,$*)$(ROOTFS)/cdrom" $(MAKE) ARCH=$(call to_arch,$*) rootfs_finalize @@ -365,6 +398,19 @@ repo_package_info : $(REPO_DIST_DIR)/binary-$(call altarch,$(ARCH))/Packages.bz2 $(REPO_DIST_DIR)/binary-$(call altarch,$(PRIMARY_ARCH))/Packages.bz2 $(REPO_DIST_DIR)/binary-$(call altarch,$(SECONDARY_ARCH))/Packages.bz2 : $(REPO_DIST_DIR)/binary-%/Packages.bz2 : $(REPO_ARCHIVE_DIR)/Packages.% mkdir -p "$(REPO_ARCHIVE_DIR)" mkdir -p "$(REPO_DIST_DIR)/binary-$*/" + #info/release file + echo "Archive: $(ISO_RELEASE)" > "$(REPO_DIST_DIR)/binary-$*/Release" + echo "Version: $(shell echo $(ISO_VERSION) | cut -f-2 -d'.')" \ + >> "$(REPO_DIST_DIR)/binary-$*/Release" + echo "Component: main" \ + >> "$(REPO_DIST_DIR)/binary-$*/Release" + echo "Origin: Ubuntu" \ + >> "$(REPO_DIST_DIR)/binary-$*/Release" + echo "Label: Ubuntu" \ + >> "$(REPO_DIST_DIR)/binary-$*/Release" + echo "Architecture: $*" \ + >> "$(REPO_DIST_DIR)/binary-$*/Release" + cd "$(REPO_ARCHIVE_DIR)" \ && cat Packages.noarch "Packages.$*" | bzip2 -c9 > "$(REPO_DIST_DIR)/binary-$*/Packages.bz2" @@ -373,9 +419,24 @@ $(REPO_DIST_DIR)/binary-$(call altarch,$(PRIMARY_ARCH))/Packages.bz2 $(REPO_DIST repo_metadata : $(REPO_ARCHIVE_DIR)/Release $(REPO_ARCHIVE_DIR)/Release : $(REPO_DIST_DIR)/binary-$(call altarch,$(PRIMARY_ARCH))/Packages.bz2 $(REPO_DIST_DIR)/binary-$(call altarch,$(SECONDARY_ARCH))/Packages.bz2 mkdir -p "$(REPO_ARCHIVE_DIR)" - $(CURDIR)/scripts/mkdebarchive-metadata.sh "$(ISO_RELEASE)" \ - "$$(echo $(ISO_VERSION) | cut -f-2 -d'.')" \ - "$(REPO_ARCHIVE_DIR)" "$(PRIMARY_ARCH)" "$(SECONDARY_ARCH)" + + echo "Origin: Ubuntu" > "$(REPO_ARCHIVE_DIR)"/Release + echo "Label: LIP Ubuntu Extra Packages" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Suite: $(ISO_RELEASE)" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Version: $(shell echo $(ISO_VERSION) | cut -f-2 -d'.')" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Codename: $(ISO_RELEASE)" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Date: $$(LC_ALL=C date -u)" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Architectures: $(call altarch,$(PRIMARY_ARCH)) $(call altarch,$(SECONDARY_ARCH))" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Components: lip" \ + >> "$(REPO_ARCHIVE_DIR)"/Release + echo "Description: Ubuntu $(ISO_RELEASE) $(shell echo $(ISO_VERSION) | cut -f-2 -d'.')" \ + >> "$(REPO_ARCHIVE_DIR)"/Release repo_clean: $(RM) -r "$(REPO_DIST_DIR)" diff --git a/config/copy_to_rootfs_remaster_dir/patches b/config/copy_to_rootfs_remaster_dir/patches deleted file mode 120000 index cc06b73e907c4c3d5e4d608d1ee80dd77688b496..0000000000000000000000000000000000000000 --- a/config/copy_to_rootfs_remaster_dir/patches +++ /dev/null @@ -1 +0,0 @@ -../../patches/rootfs \ No newline at end of file diff --git a/contrib/rootfs/offline_repo_packages.manualurls b/contrib/rootfs/offline_repo_packages.manualurls new file mode 100644 index 0000000000000000000000000000000000000000..40cb85d5c0b3d7728b4a1cc3e79ce9a834ea11de --- /dev/null +++ b/contrib/rootfs/offline_repo_packages.manualurls @@ -0,0 +1,10 @@ +#singular +ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular_4.0.2-1_amd64.deb +ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular-common_4.0.2-1_all.deb +ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular-bin_4.0.2-1_amd64.deb +ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular-bin_4.0.2-1_i386.deb +ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular_4.0.2-1_i386.deb + +#mainline kernel +http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc2-vivid/linux-image-4.0.0-040000rc2-generic_4.0.0-040000rc2.201503031836_amd64.deb +http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc2-vivid/linux-image-4.0.0-040000rc2-generic_4.0.0-040000rc2.201503031836_i386.deb diff --git a/scripts/common_functions.sh b/scripts/common_functions.sh index 0e6065889563d4e33eafb0aa7e72347b3896af66..615a5aabfb142a3c85e2870dd0d1e0bc0d53e4ef 100644 --- a/scripts/common_functions.sh +++ b/scripts/common_functions.sh @@ -17,29 +17,6 @@ # You should have received a copy of the GNU General Public License # along with lipck. If not, see <http://www.gnu.org/licenses/>. -function patch_all() -{ - PATCH_DIR="$1" - TARGET_DIR="$2" - - if [ ! -d "$PATCH_DIR" ]; then - echo "Nothing to patch here!" - return 0 - fi - - if [ -z "$TARGET_DIR" ]; then - echo "No target directory given, assuming /" - TARGET_DIR="/" - fi - - echo "Patching $TARGET_DIR ..." - for p in "$PATCH_DIR/"* - do - cat "$p" | patch -d "$TARGET_DIR" -p1 - done - echo "done." -} - function install_debs() { DEB_DIR="$1" diff --git a/scripts/mkdebarchive-metadata.sh b/scripts/mkdebarchive-metadata.sh deleted file mode 100755 index cec2eb1b30c779cb7f2b66abaf7bf89370910aa9..0000000000000000000000000000000000000000 --- a/scripts/mkdebarchive-metadata.sh +++ /dev/null @@ -1,72 +0,0 @@ -#! /bin/bash -set -e - -#Note: this script is a subset of mkdebarchive.sh. It generates only the metadata and assumes -#that the package files as well as the correct dirctory structure exist. -#The original script may be found in ../legacy_scripts . - -echo "mkdebarchive.sh (C) 2012-2014 Mmoebius/ALUG, trilader/ALUG; 2014 Christopher Spinrath/OSAK" -echo "License: GPLv3 GNU Public License" -echo "Usage: mkdebarchive-metadata.sh dist-codename dist-version archives-dir architecture_list..." - -test $# -ge 4 || ( echo "Expecting at least 4 arguments!" && exit 1 ) - -DIST_CODENAME="$1" -DIST_VERSION="$2" -BUILD_DATE="$(LC_ALL=C date -u)" -echo "Running for Ubuntu $DIST_VERSION ($DIST_CODENAME)..." - -ARCHIVES_DIR="$3" - -#we have three arguments followed by the architecture list -shift 3 - -echo "Prerequisite: Alle .deb-Packete liegen in $ARCHIVES_DIR" -test -d "$ARCHIVES_DIR" || { echo "FAIL: no '$ARCHIVES_DIR'"; exit 2; } -cd "$ARCHIVES_DIR" - -ARCH_STR="" - -for ARCH in $@; do - -echo -echo "Erzeuge './dists/$DIST_CODENAME/lip/binary-$ARCH/Release'" -mkdir -p "dists/$DIST_CODENAME/lip/binary-$ARCH/" -cat >dists/$DIST_CODENAME/lip/binary-$ARCH/Release <<EOF -Archive: $DIST_CODENAME -Version: $DIST_VERSION -Component: main -Origin: Ubuntu -Label: Ubuntu -Architecture: $ARCH -EOF - -ARCH_STR="$ARCH_STR $ARCH" - -done - -echo -echo "Erzeuge './Release'" -cat >Release <<EOF -Origin: Ubuntu -Label: LIP Ubuntu Extra Packages -Suite: $DIST_CODENAME -Version: $DIST_VERSION -Codename: $DIST_CODENAME -Date: $BUILD_DATE -Architectures: $ARCH_STR -Components: lip -Description: Ubuntu $DIST_CODENAME $DIST_VERSION -EOF - -#echo -#echo "Erzeuge einen geeigneten Eintrag für APT in 'sources.list.d/01lip-stick-extra.list'" -#echo "deb [ trusted=yes ] file:/${PWD#/} $DIST_CODENAME lip" > /etc/apt/sources.list.d/01lip-stick-extra.list - -#echo -#echo "User: Bitte gleich 'apt-get update' starten. Das sollte das Repository einbinden" -#echo "In diesem Verzeichnis liegen noch 3 Packages.* -Dateien. Die können gelöscht werden" -#echo "Ende." - -#end; - diff --git a/scripts/remaster_initrd.sh b/scripts/remaster_initrd.sh deleted file mode 100755 index 35405d07e67be733abbefdd3d636fca743f35195..0000000000000000000000000000000000000000 --- a/scripts/remaster_initrd.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -#This file is part of lipck - the "linux install party customization kit". -# -# Copyright (C) 2014 trilader, Anwarias, Christopher Spinrath -# -# lipck is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# lipck is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with lipck. If not, see <http://www.gnu.org/licenses/>. - -set -e - -SCRIPT_DIR="$1" -IRD="$2" -ROOTFS="$3" - -if [ ! -d "$SCRIPT_DIR" ]; then - echo "Expected lipck base path as first argument!" - exit 1 -fi - -if [ ! -d "$IRD" ]; then - echo "Expected initrd root directory as second argument!" - exit 2 -fi - -if [ ! -d "$ROOTFS" ]; then - echo "Expected rootfs directory as third argument!" - exit 3 -fi - -CONTRIB_DIR="$SCRIPT_DIR/contrib/initrd" - -if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then - source "$SCRIPT_DIR/scripts/common_functions.sh" -fi - -function install_nmtelekinese() -{ - mkdir -p "$IRD/lip/nm" - cp "$CONTRIB_DIR/nmtelekinese/nmtelekinese.desktop" "$IRD/lip/nm" - cp "$CONTRIB_DIR/nmtelekinese/nmtelekinese.py" "$IRD/lip/nm" - cp "$CONTRIB_DIR/nmtelekinese/26mopsmops" "$IRD/scripts/casper-bottom/" - chmod +x "$IRD/scripts/casper-bottom/26mopsmops" -} - -function add_no_bootloader_icon() -{ - mkdir -p "$IRD/lip/no-bootloader-icon" - cp "$CONTRIB_DIR/no-bootloader-icon/ubiquity-kdeui.desktop" "$IRD/lip/no-bootloader-icon/" -# cp "$SCRIPT_DIR/no-bootloader-icon/ubiquity-kdeui-no-bootloader.desktop" "$IRD/lip/no-bootloader-icon/" - - cp "$CONTRIB_DIR/no-bootloader-icon/25adduser" "$IRD/scripts/casper-bottom/" - chmod +x "$IRD/scripts/casper-bottom/25adduser" -} - -function install_liphook() -{ - cp "$CONTRIB_DIR/initrd_hook/24liphook" "$IRD/scripts/casper-bottom/" - chmod +x "$IRD/scripts/casper-bottom/24liphook" - cp "$CONTRIB_DIR/initrd_hook/ORDER" "$IRD/scripts/casper-bottom/" -} - -function replace_modules() -{ - local version=$(basename $(readlink -f "$ROOTFS/vmlinuz") | cut -d'-' -f2-) - rm -rf "$IRD/lib/modules/*" - cp -a "$ROOTFS/lib/modules/$version" "$IRD/lib/modules" -} - -mkdir -p "$IRD/lip" -install_nmtelekinese -#add_no_bootloader_icon -install_liphook -replace_modules - -patch_all "$SCRIPT_DIR/patches/initrd" "$IRD" diff --git a/scripts/remaster_iso.sh b/scripts/remaster_iso.sh deleted file mode 100755 index b0f67a675c605080bc24d145c78d2ec77a84ff31..0000000000000000000000000000000000000000 --- a/scripts/remaster_iso.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -#This file is part of lipck - the "linux install party customization kit". -# -# Copyright (C) 2014 trilader, Anwarias, Christopher Spinrath -# -# lipck is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# lipck is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with lipck. If not, see <http://www.gnu.org/licenses/>. - -set -e - -SCRIPT_DIR="$1" -ISO_REMASTER_DIR="$2" - -if [ ! -d "$SCRIPT_DIR" ]; then - echo "Expected lipck base path as first argument!" - exit 1 -fi - -if [ ! -d "$ISO_REMASTER_DIR" ]; then - echo "Expected target iso or target image root directory as second argument!" - exit 2 -fi - -if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then - source "$SCRIPT_DIR/scripts/common_functions.sh" -fi - -patch_all "$SCRIPT_DIR/patches/iso/" "$ISO_REMASTER_DIR" diff --git a/scripts/fill_offline_repo.sh b/scripts/repo_packages.sh similarity index 87% rename from scripts/fill_offline_repo.sh rename to scripts/repo_packages.sh index 408ac6d2be071ef8fcb7fc92c4207fa7506deebc..9a7319aca31d3e57046dc024c7532ce8aed8280a 100755 --- a/scripts/fill_offline_repo.sh +++ b/scripts/repo_packages.sh @@ -30,7 +30,7 @@ test -n "$ARCH" || { echo "$(basename $0): fatal error: no architecture specifi echo echo "==> Fetching packages for offline repository for $ARCH" -#source common functions (e.g. patch_all) +#source common functions if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then source "$SCRIPT_DIR/scripts/common_functions.sh" fi @@ -56,8 +56,12 @@ echo "Updating package lists..." apt-get update echo "ok." +echo "hey apt - which packages do we need (and where do we get them)?" +PKG_URLS=$(apt-get install --reinstall --print-uris -qq $PKG_LIST | cut -d"'" -f2) +PKG_URLS=$PKG_URLS $(get_packages_from_file "$CONTRIB_DIR/offline_repo_packages.manualurls") + echo "downloading archives. this may take some time..." -wget -nc -P $PKG_DESTINATION $(apt-get install --reinstall --print-uris -qq $PKG_LIST | cut -d"'" -f2) +wget -nc -P $PKG_DESTINATION $PKG_URLS #wget -nc -P $PKG_DESTINATION $(apt-get -o APT::Architecture=$ARCHITECTURE install --reinstall --allow-unauthenticated --print-uris -qq $PKG_LIST | cut -d"'" -f2) revert_initctl diff --git a/scripts/remaster_rootfs.sh b/scripts/rootfs_remaster.sh similarity index 96% rename from scripts/remaster_rootfs.sh rename to scripts/rootfs_remaster.sh index 3a674694e610192e87e80031fcd06c755b9120bd..569c7c0f91feb6a5aa17fa3e4947a9e9b4e43705 100755 --- a/scripts/remaster_rootfs.sh +++ b/scripts/rootfs_remaster.sh @@ -23,7 +23,7 @@ set -e SCRIPT_DIR="/remaster" CONTRIB_DIR="$SCRIPT_DIR/contrib/" -#source common functions (e.g. patch_all) +#source common functions if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then source "$SCRIPT_DIR/scripts/common_functions.sh" fi @@ -82,9 +82,10 @@ function install_packages() KERNEL_PKG=$(dpkg -S "$(readlink -f /vmlinuz)" | cut -d ":" -f1) if [ -z "$KERNEL_PKG" ]; then echo "LIPCK: remaster_rootfs: unable to determine installed kernel version; giving up..." + exit 1 fi #[ "$(uname -m)" == "x86_64" ] || KERNEL_PKG=linux-image-generic-lts-trusty - if [ ! -e "$(readlink -f /initrd.img)" ]; then + if [ ! -e "$(readlink -f /vmlinuz)" ]; then echo "LIPCK: No kernel in place; try to reinstall kernel image package:" echo " $KERNEL_PKG" apt-get --reinstall -y install $KERNEL_PKG @@ -149,9 +150,6 @@ install_packages install_kde_defaults -#patch rootfs -patch_all "$SCRIPT_DIR/patches/" "/" - #i.e. required for applying default-wallpaper patch #echo "compiling glib2 schemas..." #glib-compile-schemas /usr/share/glib-2.0/schemas