source: trunk/debirf/fs/usr/share/debirf/plugins/install-kernel @ 677

Last change on this file since 677 was 677, checked in by jrollins, 6 years ago

debirf: couple of small tweaks

  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[310]1#!/bin/sh
2
[393]3# debirf plugin: install-kernel
4# install a kernel package, indicated by the expected environment
5# variables:
[345]6#  DEBIRF_PATH
7#  DEBIRF_ROOT
8#  DEBIRF_KERNEL_PACKAGE
[393]9#
10# The debirf scripts were written by
11# Jameson Rollins <jrollins@fifthhorseman.net>
12# and
13# Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>.
14#
15# They are Copyright 2007, and are all released under the GPL, version 2
16# or later.
[310]17
18install_kernel_dpkg() {
19    local KNAME=$(basename "$1")
20    cp "$1" "$DEBIRF_ROOT/root/$KNAME"
[380]21    debirf_exec dpkg --install "root/$KNAME"
[310]22    # and clean up, just in case there were missing dependencies.
[380]23    debirf_exec apt-get -f install
[310]24    rm "$DEBIRF_ROOT/root/$KNAME"
25}
26
27install_kernel() {
28    # kernel install settings
29    cat >"$DEBIRF_ROOT/etc/kernel-img.conf" <<EOF
30# debirf: default kernel-img options:
31do_symlinks = yes
32do_bootloader = no
33do_initrd = yes
34EOF
35   
36    install_kernel_dpkg "$1"
37   
[677]38    # remove kernel symlinks
39    rm "$DEBIRF_ROOT"/{vmlinuz,initrd.img}
[345]40    # extract kernel and debian stock initrd:
[676]41    mv "$DEBIRF_ROOT"/boot/{vmlinu*,initrd*} "$DEBIRF_BUILDD"
[310]42}
43
44##### install kernel
[317]45install_kernel "$DEBIRF_KERNEL_PACKAGE"
Note: See TracBrowser for help on using the repository browser.