diff options
Diffstat (limited to 'meta/packages')
-rw-r--r-- | meta/packages/oh/qemu-config.bb | 17 | ||||
-rwxr-xr-x | meta/packages/oh/qemu-config/qemu-autostart | 34 |
2 files changed, 47 insertions, 4 deletions
diff --git a/meta/packages/oh/qemu-config.bb b/meta/packages/oh/qemu-config.bb index d7c401eb2e..f50d367c96 100644 --- a/meta/packages/oh/qemu-config.bb +++ b/meta/packages/oh/qemu-config.bb | |||
@@ -1,13 +1,14 @@ | |||
1 | DESCRIPTION = "Adds scripts to use distcc on the host system under qemu" | 1 | DESCRIPTION = "Adds scripts to use distcc on the host system under qemu" |
2 | LICENSE = "GPL" | 2 | LICENSE = "GPL" |
3 | RDEPENDS = "distcc task-poky-nfs-server fakeroot" | 3 | RDEPENDS = "distcc task-poky-nfs-server fakeroot oprofileui-server" |
4 | PR = "r6" | 4 | PR = "r9" |
5 | 5 | ||
6 | SRC_URI = "file://distcc.sh \ | 6 | SRC_URI = "file://distcc.sh \ |
7 | file://anjuta-remote-run \ | 7 | file://anjuta-remote-run \ |
8 | file://exports \ | 8 | file://exports \ |
9 | file://shutdown.desktop \ | 9 | file://shutdown.desktop \ |
10 | file://shutdown.png" | 10 | file://shutdown.png \ |
11 | file://qemu-autostart" | ||
11 | 12 | ||
12 | S = "${WORKDIR}" | 13 | S = "${WORKDIR}" |
13 | 14 | ||
@@ -28,4 +29,12 @@ do_install() { | |||
28 | 29 | ||
29 | install -d ${D}${datadir}/pixmaps | 30 | install -d ${D}${datadir}/pixmaps |
30 | install -m 0644 shutdown.png ${D}${datadir}/pixmaps/ | 31 | install -m 0644 shutdown.png ${D}${datadir}/pixmaps/ |
31 | } | 32 | |
33 | install -d ${D}/etc/init.d | ||
34 | install qemu-autostart ${D}/etc/init.d | ||
35 | } | ||
36 | |||
37 | inherit update-rc.d | ||
38 | |||
39 | INITSCRIPT_NAME = "qemu-autostart" | ||
40 | INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ." | ||
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 | ||