diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2009-11-11 19:30:54 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2009-11-11 19:30:54 +0000 |
commit | d63ea8a2fe1484dae8f23d388bf9e5e93bd0afb9 (patch) | |
tree | a28aed24c3d0606718a2a2a7a099447aab84a403 /encap/src/encap-profiles/runit-1.7.2.ep | |
parent | 2535920830fc57f30fd6eb9c4b6569a100d40126 (diff) | |
download | bcfg2-d63ea8a2fe1484dae8f23d388bf9e5e93bd0afb9.tar.gz bcfg2-d63ea8a2fe1484dae8f23d388bf9e5e93bd0afb9.tar.bz2 bcfg2-d63ea8a2fe1484dae8f23d388bf9e5e93bd0afb9.zip |
No longer being maintained, no one expressed interest on mailing list, so removing from trunk.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5569 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src/encap-profiles/runit-1.7.2.ep')
-rw-r--r-- | encap/src/encap-profiles/runit-1.7.2.ep | 345 |
1 files changed, 0 insertions, 345 deletions
diff --git a/encap/src/encap-profiles/runit-1.7.2.ep b/encap/src/encap-profiles/runit-1.7.2.ep deleted file mode 100644 index 66ebcdeb9..000000000 --- a/encap/src/encap-profiles/runit-1.7.2.ep +++ /dev/null @@ -1,345 +0,0 @@ -<?xml version="1.0"?> - -<!-- $Id$ --> - -<encap_profile - profile_ver="1.0" - pkgspec="runit-1.7.2" -> - -<prereq package="m4-1.4.4" /> -<prereq package="patch-2.5.9" /> - -<environment - variable="CC" - value="gcc -static-libgcc" - type="set" -/> - -<environment - variable="PATH" -PLATFORM_IF_MATCH(solaris) - value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:" -PLATFORM_ELSE - value="/usr/local/lib/bcfg2/bin:/usr/local/bin:" -PLATFORM_ENDIF - type="prepend" -/> - -<environment - variable="CPPFLAGS" - value="-I/usr/local/lib" - type="set" -/> - -PLATFORM_IF_MATCH(linux) -PLATFORM_ELSE -<environment - variable="MAKE" - value="gmake" - type="set" -/> -PLATFORM_ENDIF - -<source -url="http://encapsrcdist/mirror/runit/runit-1.7.2.tar.gz - http://mirror.opensysadmin.com/runit/runit-1.7.2.tar.gz - http://smarden.org/runit/runit-1.7.2.tar.gz" -use_objdir="no" -subdir="admin/runit-1.7.2" -> - -PLATFORM_IF_MATCH(aix\|solaris2.6) -<patch options="-p0" from_dir="src"><![CDATA[ ---- uw_tmp.h1 2007-06-25 01:17:00.000000000 -0400 -+++ uw_tmp.h1 2007-06-25 01:17:23.000000000 -0400 -@@ -3,7 +3,7 @@ - - /* sysdep: -utmpx */ - --#define UW_TMP_UFILE _PATH_UTMP --#define UW_TMP_WFILE _PATH_WTMP -+#define UW_TMP_UFILE UTMP_FILE -+#define UW_TMP_WFILE WTMP_FILE - - typedef struct utmp uw_tmp; -]]></patch> -PLATFORM_ELSE -PLATFORM_ENDIF - -PLATFORM_IF_MATCH(solaris) -<patch options="-p0" from_dir="src"><![CDATA[ ---- Makefile 2007-07-02 10:09:24.000000000 -0400 -+++ Makefile 2007-07-02 10:09:45.000000000 -0400 -@@ -6,10 +6,10 @@ - ./check-local $(IT) - - runit: load runit.o unix.a byte.a -- ./load runit unix.a byte.a -static -+ ./load runit unix.a byte.a - - runit-init: load runit-init.o unix.a byte.a -- ./load runit-init unix.a byte.a -static -+ ./load runit-init unix.a byte.a - - runsv: load runsv.o unix.a byte.a time.a - ./load runsv unix.a byte.a time.a -]]></patch> -PLATFORM_ELSE -PLATFORM_ENDIF - -PLATFORM_IF_MATCH(solaris2.6) -<patch options="-p0" from_dir="src"><![CDATA[ ---- utmpset.c 2007-07-19 07:08:25.356231209 -0400 -+++ utmpset.c 2007-07-19 07:08:41.279314222 -0400 -@@ -34,7 +34,6 @@ - while (read(fd, &ut, sizeof(uw_tmp)) == sizeof(uw_tmp)) { - if (!ut.ut_name[0] || (str_diff(ut.ut_line, line) != 0)) continue; - memset(ut.ut_name, 0, sizeof ut.ut_name); -- memset(ut.ut_host, 0, sizeof ut.ut_host); - if (time(&ut.ut_time) == -1) break; - #ifdef DEAD_PROCESS - ut.ut_type =DEAD_PROCESS; -]]></patch> -PLATFORM_ELSE -PLATFORM_ENDIF - -<configure type="unset" /> - -<build> -./package/compile -./package/check -</build> - -<install> -test -d ${ENCAP_SOURCE} || mkdir ${ENCAP_SOURCE} -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME} || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME} -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/bin || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/bin -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/runit || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/runit -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man -test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man/man8 || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man/man8 -cp command/* ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/bin -cp -r doc/* ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/runit -cp -r etc ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/runit -cp -r package ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/runit -cp man/* ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man/man8 -</install> - -<clean type="unset" /> - -</source> - -<prepackage> -# Make "this encap is installed" sentinal file available in /usr/local/var/encap -test -d var || mkdir var -test -d var/encap || mkdir var/encap -touch var/encap/${ENCAP_PKGNAME} -</prepackage> - -<include_file name="bin/runsvdir-usrlocal-start" mode="0755"><![CDATA[ -#!/bin/sh -PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin -exec env - PATH=$PATH \ -runsvdir -P /usr/local/var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' -]]></include_file> - -<include_file name="inittab.boot" mode="0644"><![CDATA[ - -SV:123456:respawn:/usr/local/bin/runsvdir-usrlocal-start -]]></include_file> - -<include_file name="upstart.boot" mode="0644"><![CDATA[ -# /etc/event.d/SV 0644 -# -# for runit - manage /usr/local/bin/runsvdir-usrlocal-start -# -start on runlevel-2 -start on runlevel-3 -start on runlevel-4 -start on runlevel-5 -stop on shutdown -respawn /usr/local/bin/runsvdir-usrlocal-start -]]></include_file> - -<include_file name="inittab-install" mode="0755"><![CDATA[ -#!/bin/sh -e -if grep SV: /etc/inittab >/dev/null -then - echo 'inittab contains an SV: line. I assume that runsvdir is already running. -' -else - echo 'Adding runsvdir to inittab...' - rm -f /etc/inittab'{new}' - cat /etc/inittab inittab.boot > /etc/inittab'{new}' - mv -f /etc/inittab'{new}' /etc/inittab - kill -HUP 1 - echo 'init should start runsvdir now. -' -fi -]]></include_file> - -<include_file name="inittab-remove" mode="0755"><![CDATA[ -#!/bin/sh -e -if grep SV: /etc/inittab >/dev/null -then - echo 'Backing up inittab to .inittab.backup...' - rm -f /etc/.inittab.backup - cp -f /etc/inittab /etc/.inittab.backup - echo 'Removing svscan lines from inittab...' - rm -f /etc/inittab'{new}' - grep -v SV: /etc/inittab > /etc/inittab'{new}' - mv -f /etc/inittab'{new}' /etc/inittab - kill -HUP 1 - echo 'init should stop runsvdir now. -' -else - echo 'inittab does not contain a runsvdir line. -' -fi -]]></include_file> - -<include_file name="postinstall" mode="0755"><![CDATA[ -#!/bin/sh -umask 002 -BASEDIR="`echo ${0} | xargs -n1 dirname`" -LOG=${BASEDIR}/postinstall.log -exec > $LOG 2>&1 - -printf "Running runit postinstall script...\n" -date - -case `uname` in - AIX|SunOS) PS="ps -ef" ;; - *) PS="ps auxw" ;; -esac - -printf "1: Make sure required directories exist...\n" -test -d /usr/local/var || mkdir /usr/local/var -test -d /usr/local/var/svlogd || mkdir /usr/local/var/svlog -test -d /usr/local/var/service || mkdir /usr/local/var/service -test -d /usr/local/etc || mkdir /usr/local/etc -test -d /usr/local/etc/default || mkdir /usr/local/etc/default -test -d /usr/local/etc/sv || mkdir /usr/local/etc/sv - -printf "\n2: Currently running runsv and svlogd processes:\n" -$PS | grep [r]unsv -$PS | grep [s]vlogd - -printf "\n3: Killing any running runsv and svlogd processes...\n" -$PS | grep [r]unsv | awk '{print $2}' | xargs -n1 -i{} kill -15 -{} 2>/dev/null -$PS | grep [s]vlogd | awk '{print $2}' | xargs -n1 -i{} kill -15 -{} 2>/dev/null -sleep 2 -$PS | grep [r]unsv | awk '{print $2}' | xargs -n1 -i{} kill -9 -{} 2>/dev/null -$PS | grep [s]vlogd | awk '{print $2}' | xargs -n1 -i{} kill -9 -{} 2>/dev/null - -printf "\n4: Currently running runsv and svlogd processes:\n" -$PS | grep [r]unsv -$PS | grep [s]vlogd - -printf "\n5: Removing any stale state information in /usr/local/etc/sv...\n" -for service in `ls /usr/local/etc/sv`; do - test -d /usr/local/etc/sv/$service/supervise && rm -rf /usr/local/etc/sv/$service/supervise - test -d /usr/local/etc/sv/$service/log/supervise && rm -rf /usr/local/etc/sv/$service/log/supervise -done - -printf "\n6: Re-enabling services that were installed before package was removed...\n" -if [ -d /usr/local/var/service/.disabled ]; then - for service in `ls /usr/local/var/service/.disabled`; do - if [ -h /usr/local/var/service/$service ]; then - printf "A new version of $service exists, removing old version...\n" - rm /usr/local/var/service/.disabled/$service - else - printf "Re-enabling service $service...\n" - mv /usr/local/var/service/.disabled/$service /usr/local/var/service/ - fi - done -fi - -printf "\n7: Making runsvdir run all the time...\n" -if [ -f /etc/inittab ]; then - printf "Installing to /etc/inittab ...\n" - cd ${ENCAP_SOURCE}/${ENCAP_PKGNAME} && ./inittab-install -fi - -if [ -d /etc/event.d ]; then - printf "Installing to /etc/event.d/SV (Upstart) ...\n" - initctl stop SV 2>/dev/null || true - cd ${ENCAP_SOURCE}/${ENCAP_PKGNAME} && cp upstart.boot /etc/event.d/SV - initctl start SV -fi - -printf "\n8: Finished runit postinstall script.\n" -]]></include_file> - -<include_file name="preremove" mode="0755"><![CDATA[ -#!/bin/sh -printf "Running runit preremove script...\n" -umask 002 -date - -case `uname` in - AIX|SunOS) PS="ps -ef" ;; - *) PS="ps auxw" ;; -esac - -printf "1: All sv processes runnning before any actions...\n" -$PS | grep [s]v - -printf "\n2: Running sv force-shutdown on all /usr/local/var/service services.\n" -printf "We wait up to an hour for each service to die - if it takes more than a\n" -printf "minute, your daemon probably doesn't properly support signals, and you\n" -printf "will probably want to manually kill the service process in another window.\n" -for service in `ls /usr/local/var/service`; do - printf "Trying to force-shutdown /usr/local/var/service/$service ...\n" - sv -v -w 3600 force-shutdown /usr/local/var/service/$service -done -sleep 2 -printf "All sv processes runnning now...\n" -$PS | grep [s]v - -printf "\n3: Removing all services from /usr/local/var/service/ - runsvdir should now\n" -printf "shut down any runsv processes...\n" -test -d /usr/local/var/service/.disabled || mkdir /usr/local/var/service/.disabled -mv /usr/local/var/service/* /usr/local/var/service/.disabled/ 2>/dev/null || printf "No services to disable.\n" -printf "Waiting 10 seconds for runsv processes to die...\n" -sleep 10 -printf "All sv processes runnning now...\n" -$PS | grep [s]v -printf "If there are any runsv or svlogd processes still running, you will need\n" -printf "to kill them manually.\n" - -printf "\n4: Now shutting down the runsvdir processes...\n" -# Stop the "runsvdir" process { -if [ -f /etc/inittab ]; then - printf "Removing from /etc/inittab ...\n" - cd ${ENCAP_SOURCE}/${ENCAP_PKGNAME} && ./inittab-remove -fi -if [ -d /etc/event.d ]; then - if [ -f /etc/event.d/SV ]; then - printf "Removing /etc/event.d/SV (Upstart) ...\n" - initctl stop SV || printf "SV already stopped...\n" - rm /etc/event.d/SV - fi -fi -# } Stop the "runsvdir" process -sleep 2 -printf "All sv processes runnning now...\n" -$PS | grep [s]v -printf "runsvdir should no longer be running.\n" - -printf "\n5: Removing any old state from /usr/local/etc/sv directories...\n" -for service in `ls /usr/local/etc/sv`; do - test -d /usr/local/etc/sv/$service/supervise && rm -rf /usr/local/etc/sv/$service/supervise - test -d /usr/local/etc/sv/$service/log/supervise && rm -rf /usr/local/etc/sv/$service/log/supervise -done - -printf "\n6: Finished runit preremove script.\n" -]]></include_file> - -<encapinfo> -description runit - a UNIX init scheme with service supervision -</encapinfo> - -</encap_profile> |