From: <abe...@us...> - 2017-06-10 16:23:57
|
Revision: 8392 http://sourceforge.net/p/astlinux/code/8392 Author: abelbeck Date: 2017-06-10 16:23:55 +0000 (Sat, 10 Jun 2017) Log Message: ----------- openvmtools, now functional, only enabled for genx86_64-vm with 'master-build', needs testing Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/initrd.config branches/1.0/package/Config.in branches/1.0/package/openvmtools/openvmtools.mk branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf branches/1.0/runnix-iso.config branches/1.0/runnix.config branches/1.0/scripts/master-build branches/1.0/x86_64-configs/astlinux-ast11.config branches/1.0/x86_64-configs/astlinux-ast13.config branches/1.0/x86_64-configs/initrd.config Added Paths: ----------- branches/1.0/package/openvmtools/openvmtools.init Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/astlinux-ast11.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:32 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:27 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -835,6 +835,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/astlinux-ast13.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:37 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:29 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -835,6 +835,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/initrd.config =================================================================== --- branches/1.0/initrd.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/initrd.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:45 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:31 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -687,6 +687,7 @@ # BR2_PACKAGE_ATTR is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/package/Config.in =================================================================== --- branches/1.0/package/Config.in 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/package/Config.in 2017-06-10 16:23:55 UTC (rev 8392) @@ -601,6 +601,7 @@ endif source "package/htop/Config.in" source "package/module-init-tools/Config.in" +source "package/openvmtools/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/procps/Config.in" source "package/psmisc/Config.in" Added: branches/1.0/package/openvmtools/openvmtools.init =================================================================== --- branches/1.0/package/openvmtools/openvmtools.init (rev 0) +++ branches/1.0/package/openvmtools/openvmtools.init 2017-06-10 16:23:55 UTC (rev 8392) @@ -0,0 +1,68 @@ +#!/bin/sh + +. /etc/rc.conf + +PIDFILE="/var/run/vmtoolsd.pid" + +test_if_in_vmware() +{ + if ! lscpu | grep -q -i '^hypervisor vendor: *vmware'; then + return 1 + fi + + if ! vmware-checkvm >/dev/null 2>&1; then + return 1 + fi + + return 0 +} + +init () { + : +} + +start () { + + if [ "$VMWARE_TOOLS" != "no" ] && test_if_in_vmware; then + echo "Starting VMware (vmtoolsd) daemon..." + + vmtoolsd -b $PIDFILE + fi +} + +stop () { + + if [ -f $PIDFILE ]; then + echo "Stopping VMware (vmtoolsd) daemon..." + kill $(cat $PIDFILE) >/dev/null 2>&1 + rm -f $PIDFILE + fi +} + +case $1 in + +start) + start + ;; + +stop) + stop + ;; + +init) + init + start + ;; + +restart) + stop + sleep 2 + start + ;; + +*) + echo "Usage: start|stop|restart" + ;; + +esac + Modified: branches/1.0/package/openvmtools/openvmtools.mk =================================================================== --- branches/1.0/package/openvmtools/openvmtools.mk 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/package/openvmtools/openvmtools.mk 2017-06-10 16:23:55 UTC (rev 8392) @@ -39,11 +39,23 @@ OPENVMTOOLS_CONF_OPT += --without-ssl endif -define OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES +define OPENVMTOOLS_POST_INSTALL rm -f $(TARGET_DIR)/etc/vmware-tools/scripts/vmware/network rm -f $(TARGET_DIR)/lib/udev/rules.d/99-vmware-scsi-udev.rules + $(INSTALL) -m 0755 -D package/openvmtools/openvmtools.init $(TARGET_DIR)/etc/init.d/openvmtools + ln -sf ../../init.d/openvmtools $(TARGET_DIR)/etc/runlevels/default/S01openvmtools + ln -sf ../../init.d/openvmtools $(TARGET_DIR)/etc/runlevels/default/K94openvmtools endef -OPENVMTOOLS_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES +OPENVMTOOLS_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS_POST_INSTALL +define OPENVMTOOLS_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/etc/vmware-tools + rm -rf $(TARGET_DIR)/usr/lib/open-vm-tools + rm -rf $(TARGET_DIR)/usr/share/open-vm-tools + rm -f $(TARGET_DIR)/etc/init.d/openvmtools + rm -f $(TARGET_DIR)/etc/runlevels/default/S01openvmtools + rm -f $(TARGET_DIR)/etc/runlevels/default/K94openvmtools +endef + $(eval $(call AUTOTARGETS,package,openvmtools)) Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-06-10 16:23:55 UTC (rev 8392) @@ -1173,5 +1173,10 @@ ## Enabled by default, set to "no" to disable. #FIRSTRUN="no" +## If the image is built with the "openvmtools" package and kernel support (genx86_64-vm) +## the vmtoolsd daemon will be started automatically when a VMware hypervisor is detected. +## Enabled by default, set to "no" to disable. +#VMWARE_TOOLS="no" + ## End rc.conf ## Modified: branches/1.0/runnix-iso.config =================================================================== --- branches/1.0/runnix-iso.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/runnix-iso.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:00 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:37 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -733,6 +733,7 @@ # BR2_PACKAGE_BOOTUTILS is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set # BR2_PACKAGE_PROCPS is not set # BR2_PACKAGE_PSMISC is not set # BR2_PACKAGE_RSYSLOG is not set Modified: branches/1.0/runnix.config =================================================================== --- branches/1.0/runnix.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/runnix.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:49 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:36 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -734,6 +734,7 @@ # BR2_PACKAGE_BOOTUTILS is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set # BR2_PACKAGE_PROCPS is not set # BR2_PACKAGE_PSMISC is not set # BR2_PACKAGE_RSYSLOG is not set Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/scripts/master-build 2017-06-10 16:23:55 UTC (rev 8392) @@ -65,6 +65,12 @@ sed -i 's:^# BR2_PACKAGE_DAHDI_NO_CARD_FIRMWARE .*$:BR2_PACKAGE_DAHDI_NO_CARD_FIRMWARE=y:' .config } +set_openvmtools_package() +{ + # enable BR2_PACKAGE_OPENVMTOOLS + sed -i 's:^# BR2_PACKAGE_OPENVMTOOLS .*$:BR2_PACKAGE_OPENVMTOOLS=y:' .config +} + set_asterisk_version() { case $1 in @@ -183,6 +189,7 @@ cp "x86_64-configs/$CONFIG" .config set_smp64vm_kernel unset_major_pci_packages + set_openvmtools_package for board in $BOARDS_SMP64VM; do build_board "$FIRMWARE" Modified: branches/1.0/x86_64-configs/astlinux-ast11.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast11.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/x86_64-configs/astlinux-ast11.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:15 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:41 2017 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -816,6 +816,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/x86_64-configs/astlinux-ast13.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast13.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/x86_64-configs/astlinux-ast13.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:19 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:43 2017 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -816,6 +816,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/x86_64-configs/initrd.config =================================================================== --- branches/1.0/x86_64-configs/initrd.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/x86_64-configs/initrd.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:25 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:45 2017 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -668,6 +668,7 @@ # BR2_PACKAGE_ATTR is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |