aboutsummaryrefslogtreecommitdiffstats
path: root/rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-11-06 20:04:54 +0100
committerVG <vg@devys.org>2016-11-06 20:04:54 +0100
commitcf0edd94c05a9fc0c609758016a697c24dd913a0 (patch)
tree568d7345b0d6e438769c4f2ef1b7ecdb66576259 /rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi
parentfb6fa99c0da96a45d458b2ffa0b9b2fe8890ac36 (diff)
downloaddebootstrap-scripts-cf0edd94c05a9fc0c609758016a697c24dd913a0.tar.gz
debootstrap-scripts-cf0edd94c05a9fc0c609758016a697c24dd913a0.tar.bz2
debootstrap-scripts-cf0edd94c05a9fc0c609758016a697c24dd913a0.zip
add other debootstrap scripts and older instructions
Diffstat (limited to 'rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi')
-rwxr-xr-xrpi2-debian-stdkernel/other_boot_files/vg-copy-rpi13
1 files changed, 13 insertions, 0 deletions
diff --git a/rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi b/rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi
new file mode 100755
index 0000000..a8eb53e
--- /dev/null
+++ b/rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -eux
+rootsource=$(findmnt -fno source -T /)
+firmwaresource=$(findmnt -fno source -T /boot/firmware/)
+if ! test x"$rootsource" = x"$firmwaresource"; then
+ cp --dereference /vmlinuz /boot/firmware/vmlinuz \
+ || cp --dereference /vmlinuz.old /boot/firmware/vmlinuz
+ cp --dereference /initrd.img /boot/firmware/initrd.img \
+ || cp --dereference /initrd.img.old /boot/firmware/initrd.img
+ ls -lah /vmlinuz /initrd.img > /boot/firmware/versions.txt \
+ || ls -lah /vmlinuz.old /initrd.img.old > /boot/firmware/versions.txt
+fi
+exit 0