From 2c68c4b8c96720d005c21efc077d92e48d0c33cf Mon Sep 17 00:00:00 2001 From: "Vladimir Pavljuchenkov (SpiderX)" Date: Sun, 2 Jul 2017 19:54:31 +0300 Subject: [PATCH] make start-stop-daemon quite, move symlink check to start_pre(), add dependency on net to depend() --- qemu.initd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu.initd b/qemu.initd index d75aafb..112632f 100755 --- a/qemu.initd +++ b/qemu.initd @@ -31,7 +31,7 @@ command_args="-mon chardev=qmp,mode=control \ -numa node,nodeid=${NUMA},memdev=${NUMAMEM} \ -k ${LANGUAGE:-en-us} ${OPTS}" name="${command##*/} for ${ID} (${NAME})" -start_stop_daemon_args="--verbose" +start_stop_daemon_args="-q" description="Start the system" extra_commands="reboot" description_reboot="Reboot the system" @@ -44,6 +44,8 @@ description_suspend="Suspend running system" description_status="Show system status" start_pre() { + if [ "$SVCNAME" = 'qemu' ] || [ "$SVCNAME" = 'kvm' ] ; then eerror "Create a symlink for the VM you want to run"; return 1; fi + if yesno ${KVM}; then command_args="${command_args} -enable-kvm"; fi if yesno ${DAEMON}; then command_args="${command_args} -daemonize"; fi if yesno ${NODEFAULTS}; then command_args="${command_args} -nodefaults"; fi @@ -60,7 +62,7 @@ start_pre() { } depend() { - if [ "$SVCNAME" = 'qemu' ] || [ "$SVCNAME" = 'kvm' ] ; then eerror "Create a symlink for the VM you want to run"; return 0; fi + need net } console() {