mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-29 14:02:32 +00:00
Clean up scripts
- the binfmt script is not needed - rename the script to instal in Docker for Mac Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
25
scripts/osx.sh
Executable file
25
scripts/osx.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/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 alpine/kernel/x86_64/vmlinuz64 "$mobydir"/vmlinuz64
|
||||
fi
|
||||
|
||||
docker run --rm --privileged --pid=host justincormack/nsenter1 /sbin/reboot
|
Reference in New Issue
Block a user