Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=d9cc6655974ce2c1bc5b6a6aa2a77c054ac3c05c

commit d9cc6655974ce2c1bc5b6a6aa2a77c054ac3c05c
Author: Priyank <priy...@frugalware.org>
Date:   Thu Jun 18 11:27:52 2009 +0530

nas-1.9-2-i686

* rc.nasd: Added some checks before starting/stopping service and other
fixes
* Fix url, up2date, source

diff --git a/source/xmultimedia/nas/FrugalBuild 
b/source/xmultimedia/nas/FrugalBuild
index e9c0a11..c6b94c6 100644
--- a/source/xmultimedia/nas/FrugalBuild
+++ b/source/xmultimedia/nas/FrugalBuild
@@ -4,8 +4,10 @@
pkgname=nas
pkgver=1.9
pkgextraver=
-pkgrel=1
+pkgrel=2
pkgdesc="The Network Audio System is a network transparent, client/server audio 
transport system."
+_F_sourceforge_ext=".src.tar.gz"
+Finclude sourceforge
url="http://radscan.com/nas.html";
license="GPL"
depends=('libxt' 'libxau' 'libxaw' 'libx11' 'libxres' 'libxtrap' 'libxp')
@@ -13,8 +15,11 @@ makedepends=('gccmakedep' 'imake' 'rman' 'xproto')
archs=('i686' 'x86_64' 'ppc')
groups=('xmultimedia')
backup=(etc/nas/nasd.conf etc/sysconfig/nasd)
-up2date="lynx -dump $url|grep tar.gz$|sed 's/.*-\(.*\)\.src.*/\1/;q'"
-source=(http://nas.codebrilliance.com/$pkgname/$pkgname-$pkgver$pkgextraver.src.tar.gz
 nasd rc.nasd rc.nasd-hu.po)
+source=(${sour...@]} nasd rc.nasd rc.nasd-hu.po)
+sha1sums=('2ee3151c71a6667bd996a0f1cda18a8b9d7cb0c7' \
+          'd2a8b9dff4487aace614fe2f35b297a1f3471dd3' \
+          'ee25502041c96da2d5271c95fbc60ddd40561c64' \
+          '13c0604884801eb1a0a44059924eb9476e121a78')

build()
{
@@ -33,8 +38,4 @@ build()
Frcd2 nasd
}

-sha1sums=('2ee3151c71a6667bd996a0f1cda18a8b9d7cb0c7'\
-          'd2a8b9dff4487aace614fe2f35b297a1f3471dd3'\
-          '39ba094543791d2b681bc288276f2d1cab28df87'\
-          '13c0604884801eb1a0a44059924eb9476e121a78')
# optimization OK
diff --git a/source/xmultimedia/nas/rc.nasd b/source/xmultimedia/nas/rc.nasd
index eb90d30..39efc15 100644
--- a/source/xmultimedia/nas/rc.nasd
+++ b/source/xmultimedia/nas/rc.nasd
@@ -11,6 +11,7 @@ source /lib/initscripts/functions
TEXTDOMAIN=nasd
TEXTDOMAINDIR=/lib/initscripts/messages
SERVICE=nasd
+pid="pidof $SERVICE 2> /dev/null"

actions=(restart status start stop)
daemon=$"Network transparent audio server"
@@ -25,15 +26,23 @@ fi
rc_start()
{
start_msg
-       /usr/bin/$SERVICE $NASD_OPTIONS >> /dev/null 2>&1
-       ok $?
+       if [ -z "$(eval $pid)" ]; then
+               /usr/bin/$SERVICE $NASD_OPTIONS >> /dev/null 2>&1
+               ok $?
+       else
+               ok 999
+       fi
}

rc_stop()
{
stop_msg
-        killall $SERVICE
+       if [ ! -z "$(eval $pid)" ]; then
+               killall $SERVICE
ok $?
+       else
+               ok 999
+       fi
}

rc_exec $1
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to