chore: use machined for shutdown calls

Use machined socket for `shutdown`, `poweroff` alias.

Depends on: https://github.com/siderolabs/talos/pull/7489

Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
Noel Georgi 2023-07-19 17:18:55 +05:30
parent 048de33816
commit 6366b171c7
No known key found for this signature in database
GPG Key ID: 21A9F444075C9E36
4 changed files with 12 additions and 10 deletions

View File

@ -7,4 +7,4 @@ metadata:
This system extension provides the network-ups-tools upsmon service.
compatibility:
talos:
version: ">= v1.2.0"
version: ">= v1.5.0"

View File

@ -5,6 +5,7 @@ depends:
- addresses
- connectivity
- etcfiles
- path: /system/run/machined/machine.sock
container:
entrypoint: ./upsmon
args:
@ -30,9 +31,9 @@ container:
options:
- bind
- ro
# `/sbin/init` talks to `apid`.
- source: /system/run/apid/apid.sock
destination: /system/run/apid/apid.sock
# `/sbin/init` talks to `machined`.
- source: /system/run/machined/machine.sock
destination: /system/run/machined/machine.sock
type: bind
options:
- rshared

View File

@ -25,8 +25,7 @@ steps:
ln -s /toolchain/bin/python3 /toolchain/bin/python
pip3 install ninja
build:
- |
extra_args=( )
if [[ "${ARCH}" == aarch64 ]]; then
@ -48,7 +47,8 @@ steps:
--enable-guest-agent \
--enable-stack-protector \
"${extra_args[@]}"
build:
- |
make -j $(nproc) qemu-ga
install:
- |

View File

@ -1,6 +1,7 @@
name: qemu-guest-agent
depends:
- service: cri
- path: /system/run/machined/machine.sock
- path: /dev/virtio-ports/org.qemu.guest_agent.0
container:
entrypoint: ./qemu-ga
@ -34,9 +35,9 @@ container:
- rshared
- rbind
- rw
# `/sbin/init` talks to `apid`.
- source: /system/run/apid/apid.sock
destination: /system/run/apid/apid.sock
# `/sbin/init` talks to `machined`.
- source: /system/run/machined/machine.sock
destination: /system/run/machined/machine.sock
type: bind
options:
- rshared