rootfs/usr/local/bin/autorun: adding autorun checks on new fat32 formatted USER partition
This commit is contained in:
parent
8308101a35
commit
d8dd960dd5
2
Makefile
2
Makefile
|
@ -73,7 +73,7 @@ vm-efi: out/airgap.iso
|
||||||
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
||||||
-display gtk,show-menubar=off,zoom-to-fit=on \
|
-display gtk,show-menubar=off,zoom-to-fit=on \
|
||||||
-device usb-storage,drive=usbdrive \
|
-device usb-storage,drive=usbdrive \
|
||||||
-drive id=usbdrive,if=none,format=raw,file=airgap.iso \
|
-drive id=usbdrive,if=none,format=raw,file=out/airgap.iso \
|
||||||
-boot order=c
|
-boot order=c
|
||||||
|
|
||||||
## Signing, Verification, and Release Targets
|
## Signing, Verification, and Release Targets
|
||||||
|
|
|
@ -4,7 +4,17 @@ source /etc/profile
|
||||||
|
|
||||||
folder=${1?}
|
folder=${1?}
|
||||||
|
|
||||||
if [ -f "${folder}/autorun.sh.asc" ]; then
|
if [ "$folder" == "/media/USER" ] && [ -f "${folder}/autorun.sh" ]; then
|
||||||
|
if touch "${folder}/.write_test" 2>/dev/null; then
|
||||||
|
echo "!! Autorun: Read-only verification failed for /media/USER" >/dev/console
|
||||||
|
exit 1;
|
||||||
|
else
|
||||||
|
echo "" >/dev/console
|
||||||
|
echo "++ Autorun: Found /media/USER/autorun.sh" >/dev/console;
|
||||||
|
echo "** Autorun: Executing /media/USER/autorun.sh" >/dev/console
|
||||||
|
/bin/bash "/media/USER/autorun.sh" >/dev/console
|
||||||
|
fi
|
||||||
|
elif [ -f "${folder}/autorun.sh.asc" ]; then
|
||||||
echo "" >/dev/console
|
echo "" >/dev/console
|
||||||
echo "++ Autorun: Found ${folder}/autorun.sh" >/dev/console;
|
echo "++ Autorun: Found ${folder}/autorun.sh" >/dev/console;
|
||||||
gpg --verify "${folder}/autorun.sh.asc" >/dev/null 2>&1 || {
|
gpg --verify "${folder}/autorun.sh.asc" >/dev/null 2>&1 || {
|
||||||
|
|
Loading…
Reference in New Issue