diff options
author | Erich Eckner <git@eckner.net> | 2016-09-10 17:13:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-09-10 17:13:11 +0200 |
commit | f0a6b0fbaaef10cbcdf543972a287db7de955dd9 (patch) | |
tree | 5280943759dccf43f844a415556ad132143260f7 /makekernel.conf | |
parent | ad3335b66048a335bba86390d1bcbcc2567c2ef0 (diff) | |
download | makekernel-f0a6b0fbaaef10cbcdf543972a287db7de955dd9.tar.xz |
konfig-file fertig
Diffstat (limited to 'makekernel.conf')
-rw-r--r-- | makekernel.conf | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/makekernel.conf b/makekernel.conf new file mode 100644 index 0000000..32fe109 --- /dev/null +++ b/makekernel.conf @@ -0,0 +1,19 @@ +#!/bin/bash + +before_install_hook() { + mount -o remount,rw /boot +} + +after_install_hook() { + summen="$(sha512sum /boot/grub/grub.cfg /boot/vmlinuz-*)" + original=$(mount | grep '^[^ ]* on /boot' | awk '{print $1;}') + kopie=$(mdadm --detail /dev/disk/by-uuid/080c93f3-0c76-4821-b72f-3d1b7d807a70 | tail -n2 | sed 's/2$/1/' | grep -v "${original}" | sed 's/.* //') + echo "${summen}" + echo "${original}" + echo "${kopie}" + umount /boot || exit 1 + dd if="${original}" of="${kopie}" bs=1M || (sync; mount /boot; exit 1) || exit 1 + sync || exit 1 + mount "${kopie}" /boot -o ro || exit 1 + echo -ne "${summen}" | sha512sum -c || exit 1 +} |