Remove some obsolete scripts

- one was old for installing in d4m no longer relevant
- the other is relaced by `docker run hyperkit`

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-04-06 17:56:00 +01:00
parent dc1818147c
commit c3031e22a3
2 changed files with 0 additions and 69 deletions

View File

@ -1,44 +0,0 @@
#!/bin/sh
# This script runs a HyperKit VM reusing the Docker for Mac VPNKit.
# It requires a recent version of Docker for Mac with an updated VPNKit
set -e
HYPERKIT=/Applications/Docker.app/Contents/MacOS/com.docker.hyperkit
DB=${HOME}/Library/Containers/com.docker.docker/Data/database
DB_BRIDGE=com.docker.driver.amd64-linux/slirp/bridge-connections
# Check if VPNKit L2 bridge mode is enabled
enable_bridge() {
(cd "${DB}" && \
echo -n "1" > ${DB_BRIDGE} && \
git add ${DB_BRIDGE} && \
git commit -m "enable bridge"
)
}
(cd "${DB}"; git reset --hard)
if [ -f "${DB}/${DB_BRIDGE}" ]; then
content=$(cat "${DB}/${DB_BRIDGE}")
[ "${content}" != "1" ] && enable_bridge
else
enable_bridge
fi
KERNEL="kernel/x86_64/vmlinuz64"
: ${INITRD:="alpine/initrd.img"}
CMDLINE="earlyprintk=serial console=ttyS0"
DISK=$(mktemp disk.img.XXXX)
dd if=/dev/zero of="$DISK" bs=1048576 count=256
MEM="-m 1G"
SMP="-c 1"
SLIRP_SOCK=${HOME}/Library/Containers/com.docker.docker/Data/s50
NET="-s 2:0,virtio-vpnkit,uuid=35e617a8-5db9-4420-9dfb-84da72dec7ac,path=$SLIRP_SOCK"
IMG_HDD="-s 4,virtio-blk,$DISK"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
RND="-s 5,virtio-rnd"
LPC_DEV="-l com1,stdio"
$HYPERKIT -A $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_HDD $RND -u -f kexec,$KERNEL,$INITRD,"$CMDLINE"

View File

@ -1,25 +0,0 @@
#!/bin/sh
set -e
mobydir=/Applications/Docker.app/Contents/Resources/moby
backup_once() {
if ! [ -e "$1"- ]
then
cp "$1" "$1"-
fi
}
if [ "$1" = "undo" ]
then
cp "$mobydir"/initrd.img- "$mobydir"/initrd.img
cp "$mobydir"/vmlinuz64- "$mobydir"/vmlinuz64
else
backup_once "$mobydir"/initrd.img
backup_once "$mobydir"/vmlinuz64
cp alpine/initrd.img "$mobydir"/initrd.img
cp kernel/x86_64/vmlinuz64 "$mobydir"/vmlinuz64
fi
docker run --rm --privileged --pid=host justincormack/nsenter1 /sbin/reboot