diff options
author | Richard Purdie <richard@openedhand.com> | 2008-01-23 17:00:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-01-23 17:00:31 +0000 |
commit | 21441368996e0724d7488307254e3029d8b07b8a (patch) | |
tree | ea62d15e1ae746f7ff2097ab77f8fa034e66af35 /meta/packages/oh/qemu-config | |
parent | a9a84bfd3747ee00700ce5393c345dbaa76aca19 (diff) | |
download | poky-21441368996e0724d7488307254e3029d8b07b8a.tar.gz |
qemu-config: Autostart oprofile-server in qemu images
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3575 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/oh/qemu-config')
-rwxr-xr-x | meta/packages/oh/qemu-config/qemu-autostart | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/packages/oh/qemu-config/qemu-autostart b/meta/packages/oh/qemu-config/qemu-autostart new file mode 100755 index 0000000000..5c11269389 --- /dev/null +++ b/meta/packages/oh/qemu-config/qemu-autostart | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | killproc() { # kill the named process(es) | ||
4 | pid=`/bin/ps -e x | | ||
5 | /bin/grep $1 | | ||
6 | /bin/grep -v grep | | ||
7 | /bin/sed -e 's/^ *//' -e 's/ .*//'` | ||
8 | [ "$pid" != "" ] && kill $pid | ||
9 | } | ||
10 | |||
11 | case "$1" in | ||
12 | start) | ||
13 | echo "Starting automatic qemu services" | ||
14 | . /etc/profile | ||
15 | /usr/bin/oprofile-server & | ||
16 | ;; | ||
17 | |||
18 | stop) | ||
19 | echo "Stopping qemu services" | ||
20 | killproc oprofile-server | ||
21 | ;; | ||
22 | |||
23 | restart) | ||
24 | $0 stop | ||
25 | sleep 1 | ||
26 | $0 start | ||
27 | ;; | ||
28 | |||
29 | *) | ||
30 | echo "usage: $0 { start | stop | restart }" | ||
31 | ;; | ||
32 | esac | ||
33 | |||
34 | exit 0 | ||