From f0d9f58b7f1825fb95236f427a6400ad54ad4b5e Mon Sep 17 00:00:00 2001 From: dougb Date: Sun, 5 Aug 2012 23:19:36 +0000 Subject: Move the rc.d scripts of the form *.sh.in to *.in Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op --- emulators/open-vm-tools/Makefile | 2 +- emulators/open-vm-tools/files/vmware-guestd.in | 29 ++++++ emulators/open-vm-tools/files/vmware-guestd.sh.in | 29 ------ emulators/open-vm-tools/files/vmware-kmod.in | 101 +++++++++++++++++++++ emulators/open-vm-tools/files/vmware-kmod.sh.in | 101 --------------------- emulators/vmware-guestd4/Makefile | 2 +- emulators/vmware-guestd4/files/vmware-guestd.in | 49 ++++++++++ emulators/vmware-guestd4/files/vmware-guestd.sh.in | 49 ---------- emulators/vmware-guestd5/Makefile | 2 +- emulators/vmware-guestd5/files/vmware-guestd.in | 67 ++++++++++++++ emulators/vmware-guestd5/files/vmware-guestd.sh.in | 67 -------------- emulators/vmware-guestd6/Makefile | 2 +- emulators/vmware-guestd6/files/vmware-guestd.in | 67 ++++++++++++++ emulators/vmware-guestd6/files/vmware-guestd.sh.in | 67 -------------- 14 files changed, 317 insertions(+), 317 deletions(-) create mode 100644 emulators/open-vm-tools/files/vmware-guestd.in delete mode 100644 emulators/open-vm-tools/files/vmware-guestd.sh.in create mode 100644 emulators/open-vm-tools/files/vmware-kmod.in delete mode 100644 emulators/open-vm-tools/files/vmware-kmod.sh.in create mode 100644 emulators/vmware-guestd4/files/vmware-guestd.in delete mode 100644 emulators/vmware-guestd4/files/vmware-guestd.sh.in create mode 100644 emulators/vmware-guestd5/files/vmware-guestd.in delete mode 100644 emulators/vmware-guestd5/files/vmware-guestd.sh.in create mode 100644 emulators/vmware-guestd6/files/vmware-guestd.in delete mode 100644 emulators/vmware-guestd6/files/vmware-guestd.sh.in (limited to 'emulators') diff --git a/emulators/open-vm-tools/Makefile b/emulators/open-vm-tools/Makefile index d6b3dc395522..67368f44b0ac 100644 --- a/emulators/open-vm-tools/Makefile +++ b/emulators/open-vm-tools/Makefile @@ -75,7 +75,7 @@ CONFIGURE_ARGS+= --without-icu LIB_DEPENDS+= icuuc:${PORTSDIR}/devel/icu .endif -USE_RC_SUBR= vmware-guestd.sh vmware-kmod.sh +USE_RC_SUBR= vmware-guestd vmware-kmod .include diff --git a/emulators/open-vm-tools/files/vmware-guestd.in b/emulators/open-vm-tools/files/vmware-guestd.in new file mode 100644 index 000000000000..25c42936435a --- /dev/null +++ b/emulators/open-vm-tools/files/vmware-guestd.in @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vmware-guestd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +. /etc/rc.subr + +# Global +checkvm_cmd="%%PREFIX%%/bin/vmware-checkvm > /dev/null" + +# VMware guest daemon +name="vmware_guestd" +rcvar=vmware_guestd_enable +start_precmd="${checkvm_cmd}" +unset start_cmd +stop_precmd="${checkvm_cmd}" +unset stop_cmd +command="%%PREFIX%%/bin/vmtoolsd" +command_args="-c %%PREFIX%%/share/vmware-tools/tools.conf -p %%PREFIX%%/lib/open-vm-tools/plugins/vmsvc" +pidfile="/var/run/${name}.pid" + +load_rc_config $name +[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" +[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" +run_rc_command "$1" diff --git a/emulators/open-vm-tools/files/vmware-guestd.sh.in b/emulators/open-vm-tools/files/vmware-guestd.sh.in deleted file mode 100644 index 25c42936435a..000000000000 --- a/emulators/open-vm-tools/files/vmware-guestd.sh.in +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vmware-guestd -# REQUIRE: DAEMON -# BEFORE: LOGIN - -. /etc/rc.subr - -# Global -checkvm_cmd="%%PREFIX%%/bin/vmware-checkvm > /dev/null" - -# VMware guest daemon -name="vmware_guestd" -rcvar=vmware_guestd_enable -start_precmd="${checkvm_cmd}" -unset start_cmd -stop_precmd="${checkvm_cmd}" -unset stop_cmd -command="%%PREFIX%%/bin/vmtoolsd" -command_args="-c %%PREFIX%%/share/vmware-tools/tools.conf -p %%PREFIX%%/lib/open-vm-tools/plugins/vmsvc" -pidfile="/var/run/${name}.pid" - -load_rc_config $name -[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" -[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" -run_rc_command "$1" diff --git a/emulators/open-vm-tools/files/vmware-kmod.in b/emulators/open-vm-tools/files/vmware-kmod.in new file mode 100644 index 000000000000..4831d99a4366 --- /dev/null +++ b/emulators/open-vm-tools/files/vmware-kmod.in @@ -0,0 +1,101 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vmware-kmod +# REQUIRE: FILESYSTEMS +# BEFORE: netif + +. /etc/rc.subr + +# Global +checkvm_cmd="%%PREFIX%%/bin/vmware-checkvm > /dev/null" + +# Functions +vmware_mod_load() +{ + echo -n "Loading $1 kernel module: " + kldstat -n %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko >/dev/null 2>&1 + if [ "$?" = "0" ]; then + echo "already loaded." + else + kldload %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko >/dev/null 2>&1 + if [ "$?" = "0" ]; then + echo "done." + else + echo "failed." + fi + fi +} +vmware_mod_status() +{ + echo -n "Checking $1 kernel module: " + kldstat -n %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko >/dev/null 2>&1 + if [ "$?" = "0" ]; then + echo "loaded." + else + echo "not loaded" + fi +} + +# VMware kernel module: vmmemctl +kernel_mod="vmmemctl" +name="vmware_guest_${kernel_mod}" +rcvar=vmware_guest_${kernel_mod}_enable +extra_commands="status" +status_cmd="vmware_mod_status ${kernel_mod}" +start_precmd="${checkvm_cmd}" +start_cmd="vmware_mod_load ${kernel_mod}" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmmemctl_enable" ] && vmware_guest_vmmemctl_enable="NO" +[ -n "$vmware_guest_kmod_enable" ] && vmware_guest_vmmemctl_enable="$vmware_guest_kmod_enable" +run_rc_command "$1" + +# VMware kernel module: vmxnet +kernel_mod="vmxnet" +name="vmware_guest_${kernel_mod}" +rcvar=vmware_guest_${kernel_mod}_enable +extra_commands="status" +status_cmd="vmware_mod_status ${kernel_mod}" +start_precmd="${checkvm_cmd}" +start_cmd="vmware_mod_load ${kernel_mod}" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmxnet_enable" ] && vmware_guest_vmxnet_enable="NO" +run_rc_command "$1" + +# VMware kernel module: vmblock +kernel_mod="vmblock" +name="vmware_guest_${kernel_mod}" +rcvar=vmware_guest_${kernel_mod}_enable +extra_commands="status" +status_cmd="vmware_mod_status ${kernel_mod}" +start_precmd="${checkvm_cmd}" +start_cmd="vmware_mod_load ${kernel_mod}" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmblock_enable" ] && vmware_guest_vmblock_enable="NO" +run_rc_command "$1" + +# VMware kernel module: vmhgfs +kernel_mod="vmhgfs" +name="vmware_guest_${kernel_mod}" +rcvar=vmware_guest_${kernel_mod}_enable +extra_commands="status" +status_cmd="vmware_mod_status ${kernel_mod}" +start_precmd="${checkvm_cmd}" +start_cmd="vmware_mod_load ${kernel_mod}" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmhgfs_enable" ] && vmware_guest_vmhgfs_enable="NO" +run_rc_command "$1" diff --git a/emulators/open-vm-tools/files/vmware-kmod.sh.in b/emulators/open-vm-tools/files/vmware-kmod.sh.in deleted file mode 100644 index 4831d99a4366..000000000000 --- a/emulators/open-vm-tools/files/vmware-kmod.sh.in +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vmware-kmod -# REQUIRE: FILESYSTEMS -# BEFORE: netif - -. /etc/rc.subr - -# Global -checkvm_cmd="%%PREFIX%%/bin/vmware-checkvm > /dev/null" - -# Functions -vmware_mod_load() -{ - echo -n "Loading $1 kernel module: " - kldstat -n %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko >/dev/null 2>&1 - if [ "$?" = "0" ]; then - echo "already loaded." - else - kldload %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko >/dev/null 2>&1 - if [ "$?" = "0" ]; then - echo "done." - else - echo "failed." - fi - fi -} -vmware_mod_status() -{ - echo -n "Checking $1 kernel module: " - kldstat -n %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko >/dev/null 2>&1 - if [ "$?" = "0" ]; then - echo "loaded." - else - echo "not loaded" - fi -} - -# VMware kernel module: vmmemctl -kernel_mod="vmmemctl" -name="vmware_guest_${kernel_mod}" -rcvar=vmware_guest_${kernel_mod}_enable -extra_commands="status" -status_cmd="vmware_mod_status ${kernel_mod}" -start_precmd="${checkvm_cmd}" -start_cmd="vmware_mod_load ${kernel_mod}" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmmemctl_enable" ] && vmware_guest_vmmemctl_enable="NO" -[ -n "$vmware_guest_kmod_enable" ] && vmware_guest_vmmemctl_enable="$vmware_guest_kmod_enable" -run_rc_command "$1" - -# VMware kernel module: vmxnet -kernel_mod="vmxnet" -name="vmware_guest_${kernel_mod}" -rcvar=vmware_guest_${kernel_mod}_enable -extra_commands="status" -status_cmd="vmware_mod_status ${kernel_mod}" -start_precmd="${checkvm_cmd}" -start_cmd="vmware_mod_load ${kernel_mod}" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmxnet_enable" ] && vmware_guest_vmxnet_enable="NO" -run_rc_command "$1" - -# VMware kernel module: vmblock -kernel_mod="vmblock" -name="vmware_guest_${kernel_mod}" -rcvar=vmware_guest_${kernel_mod}_enable -extra_commands="status" -status_cmd="vmware_mod_status ${kernel_mod}" -start_precmd="${checkvm_cmd}" -start_cmd="vmware_mod_load ${kernel_mod}" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmblock_enable" ] && vmware_guest_vmblock_enable="NO" -run_rc_command "$1" - -# VMware kernel module: vmhgfs -kernel_mod="vmhgfs" -name="vmware_guest_${kernel_mod}" -rcvar=vmware_guest_${kernel_mod}_enable -extra_commands="status" -status_cmd="vmware_mod_status ${kernel_mod}" -start_precmd="${checkvm_cmd}" -start_cmd="vmware_mod_load ${kernel_mod}" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmhgfs_enable" ] && vmware_guest_vmhgfs_enable="NO" -run_rc_command "$1" diff --git a/emulators/vmware-guestd4/Makefile b/emulators/vmware-guestd4/Makefile index eaff35fd3128..6ac05533df57 100644 --- a/emulators/vmware-guestd4/Makefile +++ b/emulators/vmware-guestd4/Makefile @@ -25,7 +25,7 @@ IGNOREFILES= ${DISTFILES} WRKSRC= ${WRKDIR}/vmware-tools-distrib ONLY_FOR_ARCHS= i386 -USE_RC_SUBR= vmware-guestd.sh +USE_RC_SUBR= vmware-guestd .if !defined(BATCH) IS_INTERACTIVE= yes .endif diff --git a/emulators/vmware-guestd4/files/vmware-guestd.in b/emulators/vmware-guestd4/files/vmware-guestd.in new file mode 100644 index 000000000000..2e076c9a3a94 --- /dev/null +++ b/emulators/vmware-guestd4/files/vmware-guestd.in @@ -0,0 +1,49 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vmware-guestd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +PREFIX=%%PREFIX%% +. /etc/rc.subr + +# Global +checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null" + +# Functions +vmware_guest_kmod_start() +{ + echo 'Loading vmmemctl kernel module.' + kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1 +} + +# VMware kernel modules +name="vmware_guest_kmod" +rcvar=vmware_guest_kmod_enable +start_precmd="${checkvm_cmd}" +start_cmd="vmware_guest_kmod_start" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_kmod_enable" ] && vmware_guest_kmod_enable="NO" +run_rc_command "$1" + +# VMware guest daemon +name="vmware_guestd" +rcvar=vmware_guestd_enable +start_precmd="${checkvm_cmd}" +unset start_cmd +stop_precmd="${checkvm_cmd}" +unset stop_cmd +command="${PREFIX}/sbin/vmware-guestd" +command_args="--halt-command '/sbin/shutdown -p now' >/dev/null 2>&1" +pidfile="/var/run/${name}.pid" + +load_rc_config $name +[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" +[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" +run_rc_command "$1" diff --git a/emulators/vmware-guestd4/files/vmware-guestd.sh.in b/emulators/vmware-guestd4/files/vmware-guestd.sh.in deleted file mode 100644 index 2e076c9a3a94..000000000000 --- a/emulators/vmware-guestd4/files/vmware-guestd.sh.in +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vmware-guestd -# REQUIRE: DAEMON -# BEFORE: LOGIN - -PREFIX=%%PREFIX%% -. /etc/rc.subr - -# Global -checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null" - -# Functions -vmware_guest_kmod_start() -{ - echo 'Loading vmmemctl kernel module.' - kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1 -} - -# VMware kernel modules -name="vmware_guest_kmod" -rcvar=vmware_guest_kmod_enable -start_precmd="${checkvm_cmd}" -start_cmd="vmware_guest_kmod_start" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_kmod_enable" ] && vmware_guest_kmod_enable="NO" -run_rc_command "$1" - -# VMware guest daemon -name="vmware_guestd" -rcvar=vmware_guestd_enable -start_precmd="${checkvm_cmd}" -unset start_cmd -stop_precmd="${checkvm_cmd}" -unset stop_cmd -command="${PREFIX}/sbin/vmware-guestd" -command_args="--halt-command '/sbin/shutdown -p now' >/dev/null 2>&1" -pidfile="/var/run/${name}.pid" - -load_rc_config $name -[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" -[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" -run_rc_command "$1" diff --git a/emulators/vmware-guestd5/Makefile b/emulators/vmware-guestd5/Makefile index a05974598b67..b0dee8df1db5 100644 --- a/emulators/vmware-guestd5/Makefile +++ b/emulators/vmware-guestd5/Makefile @@ -42,7 +42,7 @@ LIB_DEPENDS+= c.6:${PORTSDIR}/misc/compat6x PLIST_SUB+= INSTALLXGTKTOOL:="@comment " .endif .else -USE_RC_SUBR= vmware-guestd.sh +USE_RC_SUBR= vmware-guestd .endif RESTRICTED= "Not sure if we can redistribute this." diff --git a/emulators/vmware-guestd5/files/vmware-guestd.in b/emulators/vmware-guestd5/files/vmware-guestd.in new file mode 100644 index 000000000000..98bcad2c83d3 --- /dev/null +++ b/emulators/vmware-guestd5/files/vmware-guestd.in @@ -0,0 +1,67 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vmware-guestd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +PREFIX=%%PREFIX%% +. /etc/rc.subr + +# Global +checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null" + +# Functions +vmware_guest_vmmemctl_start() +{ + echo 'Loading vmmemctl kernel module.' + kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1 +} +vmware_guest_vmxnet_start() +{ + echo 'Loading vmxnet kernel module.' + kldload ${PREFIX}/lib/vmware-tools/modules/vmxnet.ko >/dev/null 2>&1 +} + +# VMware kernel module: vmmemctl +name="vmware_guest_vmmemctl" +rcvar=vmware_guest_vmmemctl_enable +start_precmd="${checkvm_cmd}" +start_cmd="vmware_guest_vmmemctl_start" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmmemctl_enable" ] && vmware_guest_vmmemctl_enable="NO" +[ -n "$vmware_guest_kmod_enable" ] && vmware_guest_vmmemctl_enable="$vmware_guest_kmod_enable" +run_rc_command "$1" + +# VMware kernel module: vmxnet +name="vmware_guest_vmxnet" +rcvar=vmware_guest_vmxnet_enable +start_precmd="${checkvm_cmd}" +start_cmd="vmware_guest_vmxnet_start" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmxnet_enable" ] && vmware_guest_vmxnet_enable="NO" +run_rc_command "$1" + +# VMware guest daemon +name="vmware_guestd" +rcvar=vmware_guestd_enable +start_precmd="${checkvm_cmd}" +unset start_cmd +stop_precmd="${checkvm_cmd}" +unset stop_cmd +command="${PREFIX}/sbin/vmware-guestd" +command_args="--halt-command '/sbin/shutdown -p now' >/dev/null 2>&1" +pidfile="/var/run/${name}.pid" + +load_rc_config $name +[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" +[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" +run_rc_command "$1" diff --git a/emulators/vmware-guestd5/files/vmware-guestd.sh.in b/emulators/vmware-guestd5/files/vmware-guestd.sh.in deleted file mode 100644 index 98bcad2c83d3..000000000000 --- a/emulators/vmware-guestd5/files/vmware-guestd.sh.in +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vmware-guestd -# REQUIRE: DAEMON -# BEFORE: LOGIN - -PREFIX=%%PREFIX%% -. /etc/rc.subr - -# Global -checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null" - -# Functions -vmware_guest_vmmemctl_start() -{ - echo 'Loading vmmemctl kernel module.' - kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1 -} -vmware_guest_vmxnet_start() -{ - echo 'Loading vmxnet kernel module.' - kldload ${PREFIX}/lib/vmware-tools/modules/vmxnet.ko >/dev/null 2>&1 -} - -# VMware kernel module: vmmemctl -name="vmware_guest_vmmemctl" -rcvar=vmware_guest_vmmemctl_enable -start_precmd="${checkvm_cmd}" -start_cmd="vmware_guest_vmmemctl_start" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmmemctl_enable" ] && vmware_guest_vmmemctl_enable="NO" -[ -n "$vmware_guest_kmod_enable" ] && vmware_guest_vmmemctl_enable="$vmware_guest_kmod_enable" -run_rc_command "$1" - -# VMware kernel module: vmxnet -name="vmware_guest_vmxnet" -rcvar=vmware_guest_vmxnet_enable -start_precmd="${checkvm_cmd}" -start_cmd="vmware_guest_vmxnet_start" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmxnet_enable" ] && vmware_guest_vmxnet_enable="NO" -run_rc_command "$1" - -# VMware guest daemon -name="vmware_guestd" -rcvar=vmware_guestd_enable -start_precmd="${checkvm_cmd}" -unset start_cmd -stop_precmd="${checkvm_cmd}" -unset stop_cmd -command="${PREFIX}/sbin/vmware-guestd" -command_args="--halt-command '/sbin/shutdown -p now' >/dev/null 2>&1" -pidfile="/var/run/${name}.pid" - -load_rc_config $name -[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" -[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" -run_rc_command "$1" diff --git a/emulators/vmware-guestd6/Makefile b/emulators/vmware-guestd6/Makefile index 20cd13122a11..19449fb4fab5 100644 --- a/emulators/vmware-guestd6/Makefile +++ b/emulators/vmware-guestd6/Makefile @@ -55,7 +55,7 @@ USE_GNOME+= glib12 gtk12 PLIST_SUB+= INSTALLXGTKTOOL="@comment " .endif .else -USE_RC_SUBR= vmware-guestd.sh +USE_RC_SUBR= vmware-guestd .endif .if ${OSVERSION} >= 700000 LIB_DEPENDS+= c.6:${PORTSDIR}/misc/compat6x diff --git a/emulators/vmware-guestd6/files/vmware-guestd.in b/emulators/vmware-guestd6/files/vmware-guestd.in new file mode 100644 index 000000000000..98bcad2c83d3 --- /dev/null +++ b/emulators/vmware-guestd6/files/vmware-guestd.in @@ -0,0 +1,67 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vmware-guestd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +PREFIX=%%PREFIX%% +. /etc/rc.subr + +# Global +checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null" + +# Functions +vmware_guest_vmmemctl_start() +{ + echo 'Loading vmmemctl kernel module.' + kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1 +} +vmware_guest_vmxnet_start() +{ + echo 'Loading vmxnet kernel module.' + kldload ${PREFIX}/lib/vmware-tools/modules/vmxnet.ko >/dev/null 2>&1 +} + +# VMware kernel module: vmmemctl +name="vmware_guest_vmmemctl" +rcvar=vmware_guest_vmmemctl_enable +start_precmd="${checkvm_cmd}" +start_cmd="vmware_guest_vmmemctl_start" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmmemctl_enable" ] && vmware_guest_vmmemctl_enable="NO" +[ -n "$vmware_guest_kmod_enable" ] && vmware_guest_vmmemctl_enable="$vmware_guest_kmod_enable" +run_rc_command "$1" + +# VMware kernel module: vmxnet +name="vmware_guest_vmxnet" +rcvar=vmware_guest_vmxnet_enable +start_precmd="${checkvm_cmd}" +start_cmd="vmware_guest_vmxnet_start" +stop_precmd="${checkvm_cmd}" +stop_cmd=":" + +load_rc_config $name +[ -z "$vmware_guest_vmxnet_enable" ] && vmware_guest_vmxnet_enable="NO" +run_rc_command "$1" + +# VMware guest daemon +name="vmware_guestd" +rcvar=vmware_guestd_enable +start_precmd="${checkvm_cmd}" +unset start_cmd +stop_precmd="${checkvm_cmd}" +unset stop_cmd +command="${PREFIX}/sbin/vmware-guestd" +command_args="--halt-command '/sbin/shutdown -p now' >/dev/null 2>&1" +pidfile="/var/run/${name}.pid" + +load_rc_config $name +[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" +[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" +run_rc_command "$1" diff --git a/emulators/vmware-guestd6/files/vmware-guestd.sh.in b/emulators/vmware-guestd6/files/vmware-guestd.sh.in deleted file mode 100644 index 98bcad2c83d3..000000000000 --- a/emulators/vmware-guestd6/files/vmware-guestd.sh.in +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vmware-guestd -# REQUIRE: DAEMON -# BEFORE: LOGIN - -PREFIX=%%PREFIX%% -. /etc/rc.subr - -# Global -checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null" - -# Functions -vmware_guest_vmmemctl_start() -{ - echo 'Loading vmmemctl kernel module.' - kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1 -} -vmware_guest_vmxnet_start() -{ - echo 'Loading vmxnet kernel module.' - kldload ${PREFIX}/lib/vmware-tools/modules/vmxnet.ko >/dev/null 2>&1 -} - -# VMware kernel module: vmmemctl -name="vmware_guest_vmmemctl" -rcvar=vmware_guest_vmmemctl_enable -start_precmd="${checkvm_cmd}" -start_cmd="vmware_guest_vmmemctl_start" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmmemctl_enable" ] && vmware_guest_vmmemctl_enable="NO" -[ -n "$vmware_guest_kmod_enable" ] && vmware_guest_vmmemctl_enable="$vmware_guest_kmod_enable" -run_rc_command "$1" - -# VMware kernel module: vmxnet -name="vmware_guest_vmxnet" -rcvar=vmware_guest_vmxnet_enable -start_precmd="${checkvm_cmd}" -start_cmd="vmware_guest_vmxnet_start" -stop_precmd="${checkvm_cmd}" -stop_cmd=":" - -load_rc_config $name -[ -z "$vmware_guest_vmxnet_enable" ] && vmware_guest_vmxnet_enable="NO" -run_rc_command "$1" - -# VMware guest daemon -name="vmware_guestd" -rcvar=vmware_guestd_enable -start_precmd="${checkvm_cmd}" -unset start_cmd -stop_precmd="${checkvm_cmd}" -unset stop_cmd -command="${PREFIX}/sbin/vmware-guestd" -command_args="--halt-command '/sbin/shutdown -p now' >/dev/null 2>&1" -pidfile="/var/run/${name}.pid" - -load_rc_config $name -[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES" -[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}" -run_rc_command "$1" -- cgit