diff options
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init | 66 | ||||
-rw-r--r-- | meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb | 17 |
2 files changed, 80 insertions, 3 deletions
diff --git a/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init b/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init new file mode 100644 index 000000000..38280464a --- /dev/null +++ b/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init | |||
@@ -0,0 +1,66 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # vmtoolsd Start/stop the vmware tools daemon | ||
4 | # | ||
5 | # chkconfig: 2345 90 60 | ||
6 | # description: vmtoolsd is a daemon that starts up. for some reason, it | ||
7 | # doesn't include a sysv init startup file in the latest release. | ||
8 | # so i have to write this | ||
9 | # | ||
10 | |||
11 | ### BEGIN INIT INFO | ||
12 | # Provides: vmtoolsd | ||
13 | # Required-Start: $local_fs $syslog | ||
14 | # Required-Stop: $local_fs $syslog | ||
15 | # Default-Start: 2345 | ||
16 | # Default-Stop: 90 | ||
17 | # Short-Description: Run vmware tools daemon | ||
18 | ### END INIT INFO | ||
19 | |||
20 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
21 | DAEMON=/usr/bin/vmtoolsd | ||
22 | NAME=vmtoolsd | ||
23 | DESC="vmware tools daemon" | ||
24 | VMTOOLSDARGS=" -b /var/run/vmtoolsd.pid " | ||
25 | RETVAL="1" | ||
26 | |||
27 | # source function library | ||
28 | . /etc/init.d/functions | ||
29 | |||
30 | test -f $DAEMON || exit 0 | ||
31 | |||
32 | |||
33 | case "$1" in | ||
34 | start) | ||
35 | echo -n "Starting vmware tools daemon: " | ||
36 | start-stop-daemon --start --quiet --exec $DAEMON -- $VMTOOLSDARGS | ||
37 | RETVAL=$? | ||
38 | if [ $RETVAL -eq 0 ] ; then | ||
39 | echo "OK" | ||
40 | else | ||
41 | echo "FAIL" | ||
42 | fi | ||
43 | ;; | ||
44 | stop) | ||
45 | echo -n "Stopping vmware tools daemon: " | ||
46 | start-stop-daemon --stop --quiet --pidfile /var/run/vmtoolsd.pid | ||
47 | RETVAL=$? | ||
48 | if [ $RETVAL -eq 0 ] ; then | ||
49 | echo "OK" | ||
50 | else | ||
51 | echo "FAIL" | ||
52 | fi | ||
53 | ;; | ||
54 | status) | ||
55 | status vmtoolsd | ||
56 | exit $? | ||
57 | ;; | ||
58 | restart) | ||
59 | $0 stop && sleep 1 && $0 start | ||
60 | ;; | ||
61 | *) | ||
62 | echo "Usage: /etc/init.d/vmtoolsd {start|stop|status|restart}" | ||
63 | exit 1 | ||
64 | esac | ||
65 | |||
66 | exit $RETVAL | ||
diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb b/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb index 81e8e9624..c32d2c5b3 100644 --- a/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb +++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb | |||
@@ -24,6 +24,7 @@ LICENSE_modules/solaris = "CDDL-1.0" | |||
24 | SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ | 24 | SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ |
25 | file://tools.conf \ | 25 | file://tools.conf \ |
26 | file://vmtoolsd.service \ | 26 | file://vmtoolsd.service \ |
27 | file://vmtoolsd.init \ | ||
27 | file://0001-configure.ac-don-t-use-dnet-config.patch \ | 28 | file://0001-configure.ac-don-t-use-dnet-config.patch \ |
28 | file://0002-add-include-sys-sysmacros.h.patch \ | 29 | file://0002-add-include-sys-sysmacros.h.patch \ |
29 | file://0001-Remove-assumptions-about-glibc-being-only-libc-imple.patch \ | 30 | file://0001-Remove-assumptions-about-glibc-being-only-libc-imple.patch \ |
@@ -50,7 +51,7 @@ DEPENDS_append_libc-musl = " libtirpc" | |||
50 | # open-vm-tools is supported only on x86. | 51 | # open-vm-tools is supported only on x86. |
51 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' | 52 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' |
52 | 53 | ||
53 | inherit autotools pkgconfig systemd | 54 | inherit autotools pkgconfig systemd update-rc.d |
54 | 55 | ||
55 | SYSTEMD_SERVICE_${PN} = "vmtoolsd.service" | 56 | SYSTEMD_SERVICE_${PN} = "vmtoolsd.service" |
56 | 57 | ||
@@ -85,8 +86,14 @@ RDEPENDS_${PN} = "util-linux libdnet fuse" | |||
85 | 86 | ||
86 | do_install_append() { | 87 | do_install_append() { |
87 | ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs | 88 | ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs |
88 | install -d ${D}${systemd_unitdir}/system ${D}${sysconfdir}/vmware-tools | 89 | install -d ${D}${sysconfdir}/vmware-tools |
89 | install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system | 90 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
91 | install -d ${D}${systemd_unitdir}/system | ||
92 | install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system | ||
93 | else | ||
94 | install -d ${D}${sysconfdir}/init.d | ||
95 | install -m 0755 ${WORKDIR}/vmtoolsd.init ${D}${sysconfdir}/init.d/vmtoolsd | ||
96 | fi | ||
90 | install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf | 97 | install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf |
91 | } | 98 | } |
92 | 99 | ||
@@ -95,6 +102,10 @@ do_configure_prepend() { | |||
95 | export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so | 102 | export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so |
96 | } | 103 | } |
97 | 104 | ||
105 | INITSCRIPT_PACKAGES = "${PN}" | ||
106 | INITSCRIPT_NAME_${PN} = "vmtoolsd" | ||
107 | INITSCRIPT_PARAMS_${PN} = "start 90 2 3 4 5 . stop 60 0 1 6 ." | ||
108 | |||
98 | python() { | 109 | python() { |
99 | if 'networking-layer' not in d.getVar('BBFILE_COLLECTIONS').split() or \ | 110 | if 'networking-layer' not in d.getVar('BBFILE_COLLECTIONS').split() or \ |
100 | 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): | 111 | 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): |