From 8c917e47f78c7bef86189d6e376352ae77d5bdbb Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 27 Nov 2009 03:35:43 +0100 Subject: [PATCH] OpenRC: add changes to support vmware-tools out-of-the-box. - Create /etc/init.d/fake-rc.d and rc[0-6].d symlinks. The vmware-tools script will be installed here. - In /etc/conf.d/local by default will start/stop /etc/init.d/vmware-tools if exists. Bump revision. --HG-- extra : convert_revision : df7205367d95b31ded11872ce88f88cf5dbf0764 --- srcpkgs/OpenRC/patches/xbps_changes.diff | 27 ++++++++++++++++++++++++ srcpkgs/OpenRC/template | 9 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/srcpkgs/OpenRC/patches/xbps_changes.diff b/srcpkgs/OpenRC/patches/xbps_changes.diff index 965be701ea..67aa4a82b7 100644 --- a/srcpkgs/OpenRC/patches/xbps_changes.diff +++ b/srcpkgs/OpenRC/patches/xbps_changes.diff @@ -7,6 +7,7 @@ xbps changes: * Build fix for kernel>=2.6.30 * Sets unicode, rc_logger and rc_shell in /etc/rc.conf by default. * Sets windowkeys and fix_euro in /etc/conf.d/keymaps by default. +* In local service, start/stop vmware-tools services if script exists. --- runlevels/Makefile.Linux.orig 2009-05-07 15:48:37.075825332 +0000 +++ runlevels/Makefile.Linux 2009-05-07 15:48:52.008557039 +0000 @@ -132,3 +133,29 @@ xbps changes: ${SHLIB_NAME}: ${SOBJS} @${ECHO} building shared library $@ +--- conf.d/local.orig 2009-11-27 03:24:48.619351115 +0100 ++++ conf.d/local 2009-11-27 03:26:21.519479673 +0100 +@@ -5,6 +5,11 @@ local_start() { + # This is a good place to load any misc programs + # on startup (use &>/dev/null to hide output) + ++ # Start vmware-tools services if script exists. ++ if [ -x /etc/init.d/vmware-tools ]; then ++ /etc/init.d/vmware-tools start ++ fi ++ + # We should always return 0 + return 0 + } +@@ -13,6 +18,11 @@ local_stop() { + # This is a good place to unload any misc. + # programs you started above. + ++ # Stop vmware-tools services if script exists ++ if [ -x /etc/init.d/vmware-tools ]; then ++ /etc/init.d/vmware-tools stop ++ fi ++ + # We should always return 0 + return 0 + } diff --git a/srcpkgs/OpenRC/template b/srcpkgs/OpenRC/template index b6d8e54e93..944f13802a 100644 --- a/srcpkgs/OpenRC/template +++ b/srcpkgs/OpenRC/template @@ -1,7 +1,7 @@ # Template file for 'OpenRC' pkgname=OpenRC version=0.5.2 -revision=1 +revision=2 wrksrc=openrc-${version} distfiles="http://roy.marples.name/downloads/openrc/openrc-$version.tar.bz2" build_style=gnu_makefile @@ -49,4 +49,11 @@ post_install() install -d ${DESTDIR}/etc/default mv ${DESTDIR}/etc/rc.conf ${DESTDIR}/etc/default install -m 644 ${FILESDIR}/rc.conf ${DESTDIR}/etc + # + # Create a fake rc.d directory with links to mimic old sysvinit + # runlevel stuff. + install -d ${DESTDIR}/etc/init.d/fake-rc.d + for f in 0 1 2 3 4 5 6; do + cd ${DESTDIR}/etc/init.d && ln -s fake-rc.d rc${f}.d + done }