aboutsummaryrefslogtreecommitdiffstats
path: root/rpi2-debian-stdkernel/files/vg-copy-rpi
blob: 2d5fd7aec9ebb61d562bf75cabd8bd92127a05da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -eux
if ! test -e /proc/mounts; then exit 0; fi
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