mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
Merge pull request #1313 from justincormack/hyperkit-cli
Make the hyperkit script get the kernel command line if just passed a name
This commit is contained in:
commit
31b9055ac0
4
Makefile
4
Makefile
@ -57,7 +57,7 @@ endif
|
|||||||
|
|
||||||
.PHONY: hyperkit hyperkit-test
|
.PHONY: hyperkit hyperkit-test
|
||||||
hyperkit: scripts/hyperkit.sh bin/com.docker.hyperkit bin/vpnkit moby-initrd.img moby-bzImage moby.yaml
|
hyperkit: scripts/hyperkit.sh bin/com.docker.hyperkit bin/vpnkit moby-initrd.img moby-bzImage moby.yaml
|
||||||
./scripts/hyperkit.sh moby "$(shell bin/moby --cmdline moby.yaml)"
|
./scripts/hyperkit.sh moby
|
||||||
|
|
||||||
define check_test_log
|
define check_test_log
|
||||||
@cat $1 |grep -q 'Moby test suite PASSED'
|
@cat $1 |grep -q 'Moby test suite PASSED'
|
||||||
@ -65,7 +65,7 @@ endef
|
|||||||
|
|
||||||
hyperkit-test: scripts/hyperkit.sh bin/com.docker.hyperkit bin/vpnkit test-initrd.img test-bzImage
|
hyperkit-test: scripts/hyperkit.sh bin/com.docker.hyperkit bin/vpnkit test-initrd.img test-bzImage
|
||||||
rm -f disk.img
|
rm -f disk.img
|
||||||
script -q /dev/null ./scripts/hyperkit.sh test "$(shell bin/moby --cmdline moby.yaml)" | tee test.log
|
script -q /dev/null ./scripts/hyperkit.sh test | tee test.log
|
||||||
$(call check_test_log, test.log)
|
$(call check_test_log, test.log)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
@ -2,12 +2,23 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]
|
||||||
|
then
|
||||||
PREFIX="moby"
|
PREFIX="moby"
|
||||||
[ $# -ge 1 ] && PREFIX="$1"
|
|
||||||
|
|
||||||
KERNEL="$PREFIX-bzImage"
|
KERNEL="$PREFIX-bzImage"
|
||||||
INITRD="$PREFIX-initrd.img"
|
INITRD="$PREFIX-initrd.img"
|
||||||
CMDLINE="$2"
|
CMDLINE=$(bin/moby --cmdline ${PREFIX}.yaml)
|
||||||
|
elif [ $# -eq 1 ]
|
||||||
|
then
|
||||||
|
PREFIX="$1"
|
||||||
|
KERNEL="$PREFIX-bzImage"
|
||||||
|
INITRD="$PREFIX-initrd.img"
|
||||||
|
CMDLINE=$(bin/moby --cmdline ${PREFIX}.yaml)
|
||||||
|
else
|
||||||
|
KERNEL=$1
|
||||||
|
INITRD=$2
|
||||||
|
CMDLINE=$3
|
||||||
|
fi
|
||||||
|
|
||||||
SLIRP_SOCK="$HOME/Library/Containers/com.docker.docker/Data/s50"
|
SLIRP_SOCK="$HOME/Library/Containers/com.docker.docker/Data/s50"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user