From e1c40a388ac28d237ab278b8dd3682c76757b9fe Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Sun, 12 Jun 2016 17:54:28 +0100 Subject: [PATCH] added "install_default_kernel" in "customise" --- libdevuansdk | 1 + zlibs/customise | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 zlibs/customise diff --git a/libdevuansdk b/libdevuansdk index c84daf4..6400449 100644 --- a/libdevuansdk +++ b/libdevuansdk @@ -61,6 +61,7 @@ source $R/zlibs/helpers source $R/zlibs/imaging source $R/zlibs/iso source $R/zlibs/sysconf +source $R/zlibs/customise # conclude initialization diff --git a/zlibs/customise b/zlibs/customise new file mode 100644 index 0000000..27cca01 --- /dev/null +++ b/zlibs/customise @@ -0,0 +1,50 @@ +#!/usr/bin/env zsh +# +# Copyright (c) 2016 Dyne.org Foundation +# libdevuansdk is written and maintained by +# Jaromil +# KatolaZ +# parazyd +# +# This file is part of libdevuansdk +# +# This source code 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. +# +# This software 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 this source code. If not, see . + +### customise + +install_default_kernel(){ + fn install_default_kernel $@ + req=(strapdir os release version arch) + root=$strapdir + reqck || return 1 + + local kernel_base=linux-image + + case $arch in + amd64) + kernel=${kernel_base}-amd64 + ;; + i386) + kernel=${kernel_base}-586 + ;; + *) + error "Architecture ::1 is not supported!!!" ${arch} + ;; + esac + + mountdevprocsys ${root} + sudo chroot ${root} apt-get install --no-install-recommends ${kernel} + umountdevprocsys ${root} + notice "default kernel installed" +}