mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
e161cf1dde
The same firmware image may be deployed on either bare metal device or virtualized platforms (e.g., Proxmox VE). On bare metal device, `qemu-ga` may still be started even though no virtio-serial channel is available, resulting in repeated attempts to access /dev/virtio-ports/org.qemu.guest_agent.0. This causes continuous service respawning by procd and unnecessary log spam. This commit adds a pre-check for /dev/virtio-ports to avoid starting `qemu-ga` when virtio-serial support is not present. Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
20 lines
422 B
Bash
Executable File
20 lines
422 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2016 OpenWrt.org
|
|
|
|
START=99
|
|
USE_PROCD=1
|
|
|
|
BIN=/usr/bin/qemu-ga
|
|
|
|
start_service() {
|
|
if [ ! -d /dev/virtio-ports ];then
|
|
logger -t qemu-ga -p daemon.notice "/dev/virtio-ports not found. Skipping qemu-ga (this is normal on bare metal device)."
|
|
return 0
|
|
fi
|
|
procd_open_instance
|
|
procd_set_param command $BIN
|
|
procd_set_param respawn
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|