Start playing with metadata
This commit is contained in:
parent
6caf8c53b9
commit
8717fc24fd
6 changed files with 101 additions and 55 deletions
|
|
@ -9,6 +9,7 @@ init:
|
|||
- nemunaire/syslinux:086f221f281d577d300949aa1094fb20c5cd90dc
|
||||
- linuxkit/format:9c40b556691c1bf47394603aeb2dbdba21e7e32e
|
||||
- linuxkit/dm-crypt:526d32351c8246431be8e1a168cb514ff3c365af
|
||||
- linuxkit/metadata:501144d47215671e77b9cac44748a04f21236195
|
||||
- alpine:latest
|
||||
|
||||
files:
|
||||
|
|
@ -50,6 +51,10 @@ files:
|
|||
ip link set eth0 up
|
||||
udhcpc -i eth0
|
||||
|
||||
# Retrieve metadata
|
||||
wget -O /tmp/metadata.json "$(ip r | grep default | awk '{ print $3 }')/fickit-metadata"
|
||||
/usr/bin/metadata -v file=/tmp/metadata.json
|
||||
|
||||
# Try to detect backend/frontend setup
|
||||
if ip l | grep eth3 > /dev/null
|
||||
then
|
||||
|
|
@ -92,8 +97,8 @@ files:
|
|||
# Format partitions
|
||||
mkswap "${SWAP_PART}"
|
||||
#mkfs.ext4 -F "${ROOT_PART}"
|
||||
cryptsetup -q -s 512 luksFormat "${ROOT_PART}" /etc/dm-crypt/key
|
||||
cryptsetup luksOpen -d /etc/dm-crypt/key "${ROOT_PART}" crypt_fic
|
||||
cryptsetup -q -s 512 luksFormat "${ROOT_PART}" /run/config/dm-crypt/key
|
||||
cryptsetup luksOpen -d /run/config/dm-crypt/key "${ROOT_PART}" crypt_fic
|
||||
mkfs.ext4 -F /dev/mapper/crypt_fic
|
||||
sync
|
||||
|
||||
|
|
@ -220,6 +225,3 @@ files:
|
|||
o
|
||||
w
|
||||
mode: "0440"
|
||||
- path: etc/dm-crypt/key
|
||||
source: configs/dm-crypt.key
|
||||
mode: "0440"
|
||||
|
|
|
|||
Reference in a new issue