|
Last change
on this file since 370 was
370,
checked in by jrollins, 6 years ago
|
|
debirf: a couple of pretty big changes/simplifications.
condensed plugins into a single phase. it was silly to have 2 phases that ran
back-to-back, when the plugins are already run by run-parts in a particular
order.
broke out some shell functions to a /usr/share/debirf/common file that will be
sourced and therefore available to all plugins. (can we explode
setup_debirf_info function now?)
updated man page. included plugins section and section on pre-defined functions.
|
-
Property svn:executable set to
*
|
|
File size:
935 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | # debirf plugin to install a kernel package, indicated by the |
|---|
| 4 | # expected environment variables: |
|---|
| 5 | # DEBIRF_PATH |
|---|
| 6 | # DEBIRF_ROOT |
|---|
| 7 | # DEBIRF_KERNEL_PACKAGE |
|---|
| 8 | |
|---|
| 9 | install_kernel_dpkg() { |
|---|
| 10 | local KNAME=$(basename "$1") |
|---|
| 11 | cp "$1" "$DEBIRF_ROOT/root/$KNAME" |
|---|
| 12 | chroot "$DEBIRF_ROOT" dpkg --install "root/$KNAME" |
|---|
| 13 | # and clean up, just in case there were missing dependencies. |
|---|
| 14 | chroot "$DEBIRF_ROOT" apt-get -f install |
|---|
| 15 | rm "$DEBIRF_ROOT/root/$KNAME" |
|---|
| 16 | } |
|---|
| 17 | |
|---|
| 18 | install_kernel() { |
|---|
| 19 | # kernel install settings |
|---|
| 20 | cat >"$DEBIRF_ROOT/etc/kernel-img.conf" <<EOF |
|---|
| 21 | # debirf: default kernel-img options: |
|---|
| 22 | do_symlinks = yes |
|---|
| 23 | do_bootloader = no |
|---|
| 24 | do_initrd = yes |
|---|
| 25 | EOF |
|---|
| 26 | |
|---|
| 27 | install_kernel_dpkg "$1" |
|---|
| 28 | |
|---|
| 29 | # extract kernel and debian stock initrd: |
|---|
| 30 | mv "$DEBIRF_ROOT"/boot/{vmlinu*,initrd*} "$DEBIRF_PATH" |
|---|
| 31 | rm "$DEBIRF_ROOT"/{vmlinuz,initrd.img} |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | ##### install kernel |
|---|
| 35 | msg "installing kernel..." |
|---|
| 36 | install_kernel "$DEBIRF_KERNEL_PACKAGE" |
|---|
Note: See
TracBrowser
for help on using the repository browser.