aboutsummaryrefslogtreecommitdiffstats
path: root/rpi2-debian-stdkernel/other_boot_files/vg-copy-rpi
blob: a8eb53e94b10491b43532d83bf89bb78a9e0c688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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