packages/utils/qemu/files/10-qemu-ga.hotplug
Yousong Zhou 3aa9ece43c qemu: virtio-console-helper as a separate package
While at it, update copyright header.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-12-11 21:32:22 -06:00

15 lines
303 B
Bash
Executable file

#!/bin/sh
# Copyright (C) 2016 OpenWrt.org
# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
syspath="/sys/$DEVPATH"
name="$(cat "$syspath/name" 2>/dev/null)"
[ -n "$name" ] || exit 0
case "$ACTION" in
"add")
/etc/init.d/qemu-ga start
;;
esac