|
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
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | # debirf plugin: install-kernel |
|---|
| 4 | # install a kernel package, indicated by the expected environment |
|---|
| 5 | # variables: |
|---|
| 6 | # DEBIRF_PATH |
|---|
| 7 | # DEBIRF_ROOT |
|---|
| 8 | # DEBIRF_KERNEL_PACKAGE |
|---|
| 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. |
|---|
| 17 | |
|---|
| 18 | install_kernel_dpkg() { |
|---|
| 19 | local KNAME=$(basename "$1") |
|---|
| 20 | cp "$1" "$DEBIRF_ROOT/root/$KNAME" |
|---|
| 21 | debirf_exec dpkg --install "root/$KNAME" |
|---|
| 22 | # and clean up, just in case there were missing dependencies. |
|---|
| 23 | debirf_exec apt-get -f install |
|---|
| 24 | rm "$DEBIRF_ROOT/root/$KNAME" |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | install_kernel() { |
|---|
| 28 | # kernel install settings |
|---|
| 29 | cat >"$DEBIRF_ROOT/etc/kernel-img.conf" <<EOF |
|---|
| 30 | # debirf: default kernel-img options: |
|---|
| 31 | do_symlinks = yes |
|---|
| 32 | do_bootloader = no |
|---|
| 33 | do_initrd = yes |
|---|
| 34 | EOF |
|---|
| 35 | |
|---|
| 36 | install_kernel_dpkg "$1" |
|---|
| 37 | |
|---|
| 38 | # remove kernel symlinks |
|---|
| 39 | rm "$DEBIRF_ROOT"/{vmlinuz,initrd.img} |
|---|
| 40 | # extract kernel and debian stock initrd: |
|---|
| 41 | mv "$DEBIRF_ROOT"/boot/{vmlinu*,initrd*} "$DEBIRF_BUILDD" |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | ##### install kernel |
|---|
| 45 | install_kernel "$DEBIRF_KERNEL_PACKAGE" |
|---|
Note: See
TracBrowser
for help on using the repository browser.