From: <abe...@us...> - 2017-06-21 15:46:05
|
Revision: 8408 http://sourceforge.net/p/astlinux/code/8408 Author: abelbeck Date: 2017-06-21 15:46:02 +0000 (Wed, 21 Jun 2017) Log Message: ----------- openvmtools, add a default /etc/vmware-tools/tools.conf with minimal logging and a network script for suspend-vm/resume-vm Modified Paths: -------------- branches/1.0/package/openvmtools/openvmtools.mk Added Paths: ----------- branches/1.0/package/openvmtools/vmware-tools/ branches/1.0/package/openvmtools/vmware-tools/scripts/ branches/1.0/package/openvmtools/vmware-tools/scripts/vmware/ branches/1.0/package/openvmtools/vmware-tools/scripts/vmware/network branches/1.0/package/openvmtools/vmware-tools/tools.conf Modified: branches/1.0/package/openvmtools/openvmtools.mk =================================================================== --- branches/1.0/package/openvmtools/openvmtools.mk 2017-06-20 22:34:49 UTC (rev 8407) +++ branches/1.0/package/openvmtools/openvmtools.mk 2017-06-21 15:46:02 UTC (rev 8408) @@ -40,8 +40,9 @@ endif 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/vmware-tools/scripts/vmware/network $(TARGET_DIR)/etc/vmware-tools/scripts/vmware/network + $(INSTALL) -m 0644 -D package/openvmtools/vmware-tools/tools.conf $(TARGET_DIR)/etc/vmware-tools/tools.conf $(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 Added: branches/1.0/package/openvmtools/vmware-tools/scripts/vmware/network =================================================================== --- branches/1.0/package/openvmtools/vmware-tools/scripts/vmware/network (rev 0) +++ branches/1.0/package/openvmtools/vmware-tools/scripts/vmware/network 2017-06-21 15:46:02 UTC (rev 8408) @@ -0,0 +1,75 @@ +#!/bin/sh +########################################################## +# Copyright (C) 2001-2016 VMware, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation version 2.1 and no later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +########################################################## + + +# +# network (Linux) - Modified for AstLinux +# + +echo `date` ": Executing '$0'" +echo + +# +# ifplugd_action -- up|down +# +# Find any ifplugd processes, extract the interface and script +# + +ifplugd_action() +{ + local action="$1" x interface_script interface script IFS + + interface_script="$(ps | sed -n -r -e 's/^.*ifplugd[ ].* -i ([^ ]+).* -r ([^ ]+).*$/\1~\2/p')" + + unset IFS + for x in $interface_script; do + interface="$(echo "$x" | cut -s -d'~' -f1)" + script="$(echo "$x" | cut -s -d'~' -f2)" + if [ -n "$interface" -a -n "$script" ]; then + if [ -x "$script" ]; then + $script $interface $action + fi + fi + done +} + +# +# main -- +# + +main() { + exitCode=0 + + case "$1" in + poweron-vm) + ;; + suspend-vm) + ifplugd_action down + ;; + resume-vm) + ifplugd_action up + ;; + *) + ;; + esac + + return $exitCode +} + +main "$@" Property changes on: branches/1.0/package/openvmtools/vmware-tools/scripts/vmware/network ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/package/openvmtools/vmware-tools/tools.conf =================================================================== --- branches/1.0/package/openvmtools/vmware-tools/tools.conf (rev 0) +++ branches/1.0/package/openvmtools/vmware-tools/tools.conf 2017-06-21 15:46:02 UTC (rev 8408) @@ -0,0 +1,4 @@ +[logging] +vmtoolsd.level = message +vmsvc.level = error + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |