summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Teran <evan.teran@gmail.com>2015-07-19 01:55:23 +0000
committerEvan Teran <evan.teran@gmail.com>2015-07-19 01:55:23 +0000
commitd63e297054f2ac56718da950322547d492640ab5 (patch)
tree9853b3e10e217c68842cb357939480fc95cfc591 /app-emulation/vmware-player/files/vmware-server-11.2.rc
parentaddressing concerns from bug 531682. Hopefully this resolves them (diff)
downloadvmware-d63e297054f2ac56718da950322547d492640ab5.tar.gz
vmware-d63e297054f2ac56718da950322547d492640ab5.tar.bz2
vmware-d63e297054f2ac56718da950322547d492640ab5.zip
addressing comments from bug #531682, hopefully this resolves them
Diffstat (limited to 'app-emulation/vmware-player/files/vmware-server-11.2.rc')
-rw-r--r--app-emulation/vmware-player/files/vmware-server-11.2.rc55
1 files changed, 55 insertions, 0 deletions
diff --git a/app-emulation/vmware-player/files/vmware-server-11.2.rc b/app-emulation/vmware-player/files/vmware-server-11.2.rc
new file mode 100644
index 0000000..353f369
--- /dev/null
+++ b/app-emulation/vmware-player/files/vmware-server-11.2.rc
@@ -0,0 +1,55 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/vmware-server-10.0.rc,v 1.1 2013/10/19 11:38:39 dilfridge Exp $
+
+depend() {
+ need localmount vmware
+ use net
+}
+
+checkconfig() {
+ # Check if certificates exist. If not, we need to generate them, ala sshd.
+ if [ ! -e @@ETCDIR@@/ssl/rui.key -o ! -e @@ETCDIR@@/ssl/rui.crt ]; then
+ mkdir -p @@ETCDIR@@/ssl
+ openssl req -x509 -days 365 -newkey rsa:2048 -keyout @@ETCDIR@@/ssl/rui.key -out @@ETCDIR@@/ssl/rui.crt -config @@ETCDIR@@/ssl/hostd.ssl.config
+ chmod -R 600 @@ETCDIR@@/ssl
+ fi
+}
+
+start() {
+ checkconfig
+
+ ebegin Starting VMware Authentication Daemon
+ start-stop-daemon --start \
+ --exec @@PREFIX@@/sbin/vmware-authdlauncher
+ eend $?
+ ebegin Starting VMware Workstation Server
+ start-stop-daemon --start \
+ --pidfile /var/run/vmware/vmware-hostd.PID \
+ --exec @@BINDIR@@/vmware-hostd \
+ -- -a -d @@ETCDIR@@/hostd/config.xml
+
+ eend $?
+}
+
+stop() {
+ ebegin "Shutdown VMs in the AutoStart Sequence"
+ local HOHO_ADMIN="$(@@BINDIR@@/vmware-wssc-adminTool "@@ETCDIR@@/hostd/authorization.xml" 2>/dev/null)"
+
+ if [ "x" != "x${HOHO_ADMIN}" ]; then
+ @@BINDIR@@/vmware-vim-cmd -U "${HOHO_ADMIN}" hostsvc/autostartmanager/autostop
+ fi
+ eend $?
+
+ ebegin Stopping VMware Workstation Server
+ start-stop-daemon --stop \
+ --pidfile /var/run/vmware/vmware-hostd.PID \
+ --exec @@BINDIR@@/vmware-hostd
+ eend $?
+ ebegin Stopping VMware Authentication Daemon
+ #start-stop-daemon --stop \
+ # --exec @@PREFIX@@/sbin/vmware-authdlauncher
+ killall @@PREFIX@@/sbin/vmware-authdlauncher
+ eend $?
+}