1
0
Fork 0

Add global variable "KEYS_DIR"

This commit is contained in:
Braiden Vasco 2017-07-06 23:49:19 +00:00
parent 0d14a2c7f5
commit c414830e38

View file

@ -8,6 +8,7 @@ export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export DEPLOY_DIR="$BASE_DIR/deploy"
export ROOTFS_DIR="$BASE_DIR/rootfs"
export MOUNT_DIR="$BASE_DIR/mnt"
export KEYS_DIR="$BASE_DIR/keys"
export FILES_DIR="$BASE_DIR/files"
export IMG_DATE="$(date +%Y-%m-%d)"
@ -159,7 +160,7 @@ if [ ! -d "$ROOTFS_DIR" ]; then
capsh --drop=cap_setfcap -- -c "$BOOTSTRAP_CMD \
--components=main,contrib,non-free \
--arch armhf \
--keyring ./keys/raspberrypi.gpg \
--keyring $KEYS_DIR/raspberrypi.gpg \
jessie \
$ROOTFS_DIR \
http://mirrordirector.raspbian.org/raspbian/" || rmdir "$ROOTFS_DIR/debootstrap/"
@ -195,7 +196,7 @@ ln -nsf /proc/mounts "$ROOTFS_DIR/etc/mtab"
#
apply_file 644 '/etc/apt/sources.list'
on_chroot apt-key add - < keys/raspberrypi.gpg.asc
on_chroot apt-key add - < "$KEYS_DIR/raspberrypi.gpg.asc"
apply_file 644 '/etc/apt/preferences.d/raspberrypi-kernel-and-bootloader'