Move local.yaml setup to setup.sh, document software requirements
This commit is contained in:
parent
29e38f0dc7
commit
d84356606e
|
@ -1,3 +1,13 @@
|
||||||
|
# Requirements
|
||||||
|
|
||||||
|
The testing environment setup and runtime depends on the following tools:
|
||||||
|
|
||||||
|
* kpartx
|
||||||
|
* qemu
|
||||||
|
* yq-go
|
||||||
|
* ZFS
|
||||||
|
* kvm kernel module
|
||||||
|
|
||||||
# Creating a ZFSBootMenu Test Pool for QEMU
|
# Creating a ZFSBootMenu Test Pool for QEMU
|
||||||
|
|
||||||
First, run (as root) `./setup.sh` to:
|
First, run (as root) `./setup.sh` to:
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Setup a local config file
|
|
||||||
if [ ! -f local.yaml ]; then
|
|
||||||
cp ../etc/zfsbootmenu/config.yaml local.yaml
|
|
||||||
yq-go w -i local.yaml Components.ImageDir "$( pwd )"
|
|
||||||
yq-go w -i local.yaml Components.Versions false
|
|
||||||
yq-go w -i local.yaml Global.ManageImages true
|
|
||||||
yq-go d -i local.yaml Global.BootMountPoint
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Support x86_64 and ppc64(le)
|
# Support x86_64 and ppc64(le)
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
ppc64*)
|
ppc64*)
|
||||||
|
|
|
@ -48,7 +48,7 @@ xbps-install -y -S -M -r "${MNT}" --repository="${URL}" \
|
||||||
base-minimal dracut ncurses-base kbd iproute2
|
base-minimal dracut ncurses-base kbd iproute2
|
||||||
|
|
||||||
cp /etc/hostid "${MNT}/etc/"
|
cp /etc/hostid "${MNT}/etc/"
|
||||||
cp /etc/resolv.conf "${MNT}/etc/"
|
cp /etc/resolv.conf "${MNT}/etc/"
|
||||||
cp /etc/rc.conf "${MNT}/etc/"
|
cp /etc/rc.conf "${MNT}/etc/"
|
||||||
|
|
||||||
mount -t proc proc "${MNT}/proc"
|
mount -t proc proc "${MNT}/proc"
|
||||||
|
@ -65,3 +65,12 @@ zpool export ztest
|
||||||
losetup -d "${LOOP}"
|
losetup -d "${LOOP}"
|
||||||
|
|
||||||
chown "$( stat -c %U . ):$( stat -c %G . )" zfsbootmenu-pool.img
|
chown "$( stat -c %U . ):$( stat -c %G . )" zfsbootmenu-pool.img
|
||||||
|
|
||||||
|
# Setup a local config file
|
||||||
|
if [ ! -f local.yaml ]; then
|
||||||
|
cp ../etc/zfsbootmenu/config.yaml local.yaml
|
||||||
|
yq-go w -i local.yaml Components.ImageDir "$( pwd )"
|
||||||
|
yq-go w -i local.yaml Components.Versions false
|
||||||
|
yq-go w -i local.yaml Global.ManageImages true
|
||||||
|
yq-go d -i local.yaml Global.BootMountPoint
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue