forked from public/airgap
1
0
Fork 0

working autorun stack

This commit is contained in:
Lance Vick 2020-08-11 20:23:25 -07:00
parent db3ade30d4
commit d4b60d191d
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
6 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1 @@
pinentry-mode loopback

View File

@ -6,6 +6,15 @@ case "${1}" in
mkdir -p /.gnupg mkdir -p /.gnupg
cbfs -r heads/initrd/.gnupg/pubring.kbx > /.gnupg/pubring.kbx cbfs -r heads/initrd/.gnupg/pubring.kbx > /.gnupg/pubring.kbx
cbfs -r heads/initrd/.gnupg/trustdb.gpg > /.gnupg/trustdb.gpg cbfs -r heads/initrd/.gnupg/trustdb.gpg > /.gnupg/trustdb.gpg
fingerprint=$( \
gpg \
--list-keys \
--list-options no-show-unusable-uids \
--with-colons \
| awk -F: '$1 == "fpr" {print $10;}' \
| head -n1 \
)
echo "export HEADS_KEY=${fingerprint}" >> /etc/environment
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "OK" echo "OK"
else else

View File

@ -1,6 +1,7 @@
export EDITOR=/bin/vi export EDITOR=/bin/vi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin" export PATH="/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
export PS1="[\h \t] \\$ " export PS1="[\h \t] \\$ "
export GNUPGHOME=/.gnupg
source /etc/environment source /etc/environment
clear clear

View File

@ -0,0 +1,12 @@
KERNEL!="sd[a-z][0-9]", GOTO="sd_cards_auto_mount_end"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem specific options
ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,flush,user,umask=0000"
ACTION=="add", RUN+="/bin/mkdir -p /media/sd-%k", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/sd-%k"
ACTION=="add", RUN+="/usr/local/bin/autorun /media/sd-%k"
ACTION=="remove", RUN+="/bin/umount -l /media/sd-%k", RUN+="/bin/rmdir /media/sd-%k"
LABEL="sd_cards_auto_mount_end"

View File

@ -0,0 +1,17 @@
#!/bin/bash
set -e
source /etc/profile
folder=${1?}
if [ -f "${folder}/autorun.sh.asc" ]; then
echo "++ Autorun: Found ${folder}/autorun.sh" >/dev/console;
gpg --verify "${folder}/autorun.sh.asc" || {
echo "!! Autorun: Verification Failed for ${folder}/autorun.sh" \
>/dev/console;
exit 1;
}
echo "++ Autorun: Verified ${folder}/autorun.sh" >/dev/console
echo "** Autorun: Executing ${folder}/autorun.sh" >/dev/console
/bin/bash "${folder}/autorun.sh" >/dev/console
fi

View File

@ -0,0 +1,3 @@
7a1a01c10aa23be3a961c295e791dbd9d7d1db59a5cf599521163ae2fd35a15f *release/1.0.0rc7/librem13v4.rom
85dbfbb107f90ee7a61107551641af92387d0b3a83feb86e3891a522d7d68e3a *release/1.0.0rc7/librem15v4.rom
e9f6de612c80bcd5ac646eb36d668b192c66e8cdb458dbfbf5747a650473da8e *release/1.0.0rc7/airgap_x86_64.iso