mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-12-11 01:23:33 -06:00
Remove handling of Docker key.json (#4361)
The deprecated-key-path option is no longer handled, but it doesn't cause
problems because the key is explicitly ignored. It was completely removed in
Docker 19.03.0 [1].
As such, the option and the pre-start script to fix the corrupted key.json can
be removed now, as it has no effect, only printing confusing message when
Docker service fails to start.
[1] 98fc09128b
This commit is contained in:
parent
af9131cd10
commit
31f347ee0f
@ -4,6 +4,5 @@
|
||||
"tag": "{{.Name}}"
|
||||
},
|
||||
"data-root": "/mnt/data/docker",
|
||||
"deprecated-key-path": "/mnt/overlay/etc/docker/key.json",
|
||||
"bip": "172.30.232.1/23"
|
||||
}
|
||||
|
||||
@ -3,4 +3,3 @@ FailureAction=reboot
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/libexec/docker-disk-check
|
||||
ExecStopPost=/usr/libexec/docker-failure
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$SERVICE_RESULT" = "exit-code" ] && [ "$EXIT_STATUS" = "1" ]; then
|
||||
echo "Docker exited with exit status 1, this might be caused by corrupted key.json."
|
||||
size=$(stat -c %s "/mnt/overlay/etc/docker/key.json")
|
||||
echo "key.json: ${size} bytes"
|
||||
if ! jq -e < "/mnt/overlay/etc/docker/key.json" > /dev/null || [ "${size}" -eq 0 ]; then
|
||||
echo "key.json appears to be corrupted, it is not parsable. Removing it."
|
||||
rm -f "/mnt/overlay/etc/docker/key.json"
|
||||
fi
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user