From 14094dae7617a478cebc30fa2f5fbb665939e9b0 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 12 Dec 2011 09:13:10 -0600 Subject: func: rename failed_func and set it as a bash script in the header. --- abs/core/func/PKGBUILD | 10 +++++----- abs/core/func/failed_func | 20 ++++++++++++++++++++ abs/core/func/failed_func.sh | 19 ------------------- abs/core/func/func.install | 2 +- 4 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 abs/core/func/failed_func delete mode 100644 abs/core/func/failed_func.sh diff --git a/abs/core/func/PKGBUILD b/abs/core/func/PKGBUILD index d7d4019..1110451 100644 --- a/abs/core/func/PKGBUILD +++ b/abs/core/func/PKGBUILD @@ -1,6 +1,6 @@ pkgname=func pkgver=0.25 -pkgrel=2 +pkgrel=4 pkgdesc="fedora unifed network controller" url="" license="gpl" @@ -8,10 +8,10 @@ depends=(pyopenssl certmaster python_aosd) makedepends=() conflicts=() replaces=() -backup=() +backup=('etc/func/minion.conf') moddir="pkg/usr/lib/python2.6/site-packages/func/minion/modules/" install=func.install -source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func.sh fe_restart.py msg.py msg.cfg) +source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func fe_restart.py msg.py msg.cfg) arch=('i686') build() { @@ -28,7 +28,7 @@ build() { install -m755 -D $startdir/src/msg.py ${startdir}/${moddir}/msg.py install -m755 -D $startdir/src/msg.cfg ${startdir}/pkg/usr/MythVantage/etc/msg.cfg install -m755 -D $startdir/src/fe_restart.py ${startdir}/${moddir}/fe_restart.py - install -m755 -D $startdir/src/failed_func.sh $startdir/pkg/usr/MythVantage/bin/failed_func.sh + install -m755 -D $startdir/src/failed_func $startdir/pkg/usr/MythVantage/bin/failed_func mkdir -p $startdir/pkg/var/log/func cd $startdir/pkg @@ -38,7 +38,7 @@ md5sums=('892252004f122c61bb58bb4607553ffe' '1e2905074203d5c0557f143a6c50c497' '1393088fa64823606e0b1c02296041f4' '65a602524cb85773740840eaa513ce15' - 'aa4d3f4612965ae99d6ba2e40673c3ac' + '5c62fad46fb95a14bc7093b506098e07' 'b02a733b7a74569e57521bc3708724a5' '572bb6737cb03dee7e9d11ed40481bd2' '4f189262b2a686c5ac9485c6e5134045') diff --git a/abs/core/func/failed_func b/abs/core/func/failed_func new file mode 100644 index 0000000..943fab9 --- /dev/null +++ b/abs/core/func/failed_func @@ -0,0 +1,20 @@ +#!/bin/bash +. /etc/profile +. /etc/systemconfig + +#if [ x$SystemType = "xMaster_backend" -o x$SystemType = "xStandAlone" ] +#then +# exit 0 +#fi +curl -# http://$dbhost/failed_func_hosts|grep -q `hostname` +status=$? +if [ $status = 0 ] +then + echo "removing ca (failed_func.sh)" + rm -f /etc/pki/certmaster/* + echo "restarting func" + sv stop funcd + sleep 3 + sv start funcd +fi + diff --git a/abs/core/func/failed_func.sh b/abs/core/func/failed_func.sh deleted file mode 100644 index b44eb65..0000000 --- a/abs/core/func/failed_func.sh +++ /dev/null @@ -1,19 +0,0 @@ -. /etc/profile -. /etc/systemconfig - -if [ x$SystemType = "xMaster_backend" -o x$SystemType = "xStandAlone" ] -then - exit 0 -fi -curl -# http://$dbhost/failed_func_hosts|grep -q `hostname` -status=$? -if [ $status = 0 ] -then - echo "removing ca (failed_func.sh)" - rm -f /etc/pki/certmaster/* - echo "restarting func" - sv stop funcd - sleep 3 - sv start funcd -fi - diff --git a/abs/core/func/func.install b/abs/core/func/func.install index 1fcf6b1..f204214 100644 --- a/abs/core/func/func.install +++ b/abs/core/func/func.install @@ -15,7 +15,7 @@ post_install() { fi if [ ! -e /etc/cron.tenminutes/failed_func ] then - ln -s /usr/MythVantage/bin/failed_func.sh /etc/cron.tenminutes/failed_func + ln -s /usr/MythVantage/bin/failed_func /etc/cron.tenminutes/failed_func fi if [ ! -e /var/log/func ] -- cgit v0.12