libdevuansdk

common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log | Files | Refs | Submodules | README | LICENSE

commit fbf3c68b5a948fc76367f8ff8233645e5d9ba962
parent 296f733dbc32548a3576a993cdb07e905a8d0cd1
Author: parazyd <parazyd@dyne.org>
Date:   Thu, 29 Sep 2016 22:59:37 +0200

add installation of x86 kernel

Diffstat:
Mzlibs/helpers | 21++++++++++++---------
Azlibs/kernel | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 70 insertions(+), 9 deletions(-)

diff --git a/zlibs/helpers b/zlibs/helpers @@ -27,16 +27,19 @@ devprocsys() { ckreq || return 1 if [[ $watdo = mount ]]; then - sudo mount -o bind /sys $werdo/sys && act "mounted sys" - sudo mount -t proc proc $werdo/proc && act "mounted proc" - sudo mount -o bind /dev $werdo/dev && act "mounted dev" - sudo mount -o bind /dev/pts $werdo/dev/pts && act "mounted dev/pts" + sudo mount -o bind /sys $werdo/sys && act "mounted sys" && \ + sudo mount -t proc proc $werdo/proc && act "mounted proc" && \ + sudo mount -o bind /dev $werdo/dev && act "mounted dev" && \ + sudo mount -o bind /dev/pts $werdo/dev/pts && act "mounted dev/pts" && \ + return 0 elif [[ $watdo = umount ]]; then - sudo umount $werdo/dev/pts && act "umounted dev/pts" && sleep 2 - sudo umount $werdo/dev && act "umounted dev" && sleep 2 - sudo umount $werdo/proc && act "umounted proc" && sleep 2 - sudo umount $werdo/sys && act "umounted sys" && sleep 2 + sudo umount $werdo/dev/pts && act "umounted dev/pts" && sleep 1 && \ + sudo umount $werdo/dev && act "umounted dev" && sleep 1 && \ + sudo umount $werdo/proc && act "umounted proc" && sleep 1 && \ + sudo umount $werdo/sys && act "umounted sys" && sleep 1 && \ + return 0 fi + return 1 } findloopmapp() { @@ -85,7 +88,7 @@ silly() { "Supplying monkeys with typewriters" "Swapping time and space" "Self potato" - "it's all lies" + "god is porco" "A million hamsters are spinning their wheels right now" ) local rnd=$(shuf -i1-30 -n 1) diff --git a/zlibs/kernel b/zlibs/kernel @@ -0,0 +1,58 @@ +#!/usr/bin/env zsh +# Copyright (c) 2016 Dyne.org Foundation +# libdevuansdk is maintained by Ivan J. <parazyd@dyne.org> +# +# 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 <http://www.gnu.org/licenses/>. + +## all windows users are suckers + +kernel_install_amd64() { + fn kernel_install_amd64 + req=(strapdir arch) + freq=($strapdir/.done) + ckreq || return 1 + + local kernel_base="linux-image" + local kernel="${kernel_base}-amd64" + + notice "installing stock kernel for $arch" + + devprocsys mount $strapdir + + sudo chroot $strapdir \ + apt-get --yes --force-yes install $kernel + + devprocsys umount $strapdir +} + +kernel_install_i386() { + fn kernel_install_i386 + req=(strapdir arch) + freq=($strapdir/.done) + ckreq || return 1 + + local kernel_base="linux-image" + local kernel="${kernel_base}-586" + + notice "installing stock kernel for $arch" + + devprocsys mount $strapdir + + sudo chroot $strapdir \ + apt-get --yes --force-yes install $kernel + + devprocsys umount $strapdir +}