Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-0.9.git;a=commitdiff;h=86c19f8b938d87a11db62450eb4f3d3b8654de81

commit 86c19f8b938d87a11db62450eb4f3d3b8654de81
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Sun Nov 16 01:52:00 2008 +0100

exim-4.69-2solaria1-i686

- added creating /var/log/exim4 and /var/run/exim4 dirs
- fixed rc.exim, added status support
(cherry picked from commits 64f431c, 3961765 and da2bb19)

diff --git a/source/network-extra/exim/FrugalBuild 
b/source/network-extra/exim/FrugalBuild
index 3aec171..9d70597 100644
--- a/source/network-extra/exim/FrugalBuild
+++ b/source/network-extra/exim/FrugalBuild
@@ -4,7 +4,7 @@
pkgname=exim
pkgver=4.69
eximver=${pkgver%%.*}
-pkgrel=1
+pkgrel=2solaria1
pkgdesc="MTA developed at the University of Cambridge for use on Unix systems."
url="http://www.exim.org";
depends=('openldap' 'cyrus-sasl' 'libmysqlclient' 'libpq')
@@ -23,12 +23,12 @@ 
source=("${mirror}/${pkgname}${eximver}/${pkgname}-${pkgver}.tar.bz2" \
"ignore-exim_install-versioncheck.patch" \
"add-missing-destdir-to-install.patch")
sha1sums=('321e238b6e6b32498110511ce72a911538305a39' \
-         'be6a480b11b30017760b8587f76d8e9b89024720' \
-         '87cebce091e1b199ff78415e683baa6ff716c294' \
-         '3fe8d09edada2108ab57d01a03aa45f5eaf37b4c' \
-         '24dea9f29c54626721c21e26074b8b7315213cc7' \
-         '40bf828963e1d03641a300661b359dc70ea61394' \
-         'f7c2d57aa461f2c91aeb44fb4850237b3afbff91')
+          '1a5d079d92abdc62be7f5941f17940ec5631519a' \
+          '87cebce091e1b199ff78415e683baa6ff716c294' \
+          '3fe8d09edada2108ab57d01a03aa45f5eaf37b4c' \
+          '24dea9f29c54626721c21e26074b8b7315213cc7' \
+          '40bf828963e1d03641a300661b359dc70ea61394' \
+          'f7c2d57aa461f2c91aeb44fb4850237b3afbff91')
install="$pkgname.install"

build()
diff --git a/source/network-extra/exim/exim.install 
b/source/network-extra/exim/exim.install
index 4daf1d3..03ff75b 100644
--- a/source/network-extra/exim/exim.install
+++ b/source/network-extra/exim/exim.install
@@ -5,7 +5,8 @@ post_install()
[ -z "`grep '^exim:' /etc/passwd`" ] && \
useradd -u 82 -d /var/spool/exim4 -m -g exim exim

-       chown exim:exim var/spool/exim4/
+       mkdir -p /var/{spool,run,log}/exim4
+       chown exim:exim var/{spool,log}/exim4
/usr/sbin/chkconfig --add rc.exim
}

diff --git a/source/network-extra/exim/rc.exim 
b/source/network-extra/exim/rc.exim
index a9a7cb4..616e708 100644
--- a/source/network-extra/exim/rc.exim
+++ b/source/network-extra/exim/rc.exim
@@ -11,7 +11,7 @@ source /lib/initscripts/functions
TEXTDOMAIN=exim
TEXTDOMAINDIR=/lib/initscripts/messages

-actions=(restart start stop)
+actions=(restart start stop status)
#daemon=$"Exim"
source /etc/sysconfig/exim4
DAEMON=/usr/sbin/exim
@@ -29,13 +29,13 @@ rc_start()
case ${QUEUERUNNER} in
combined)
start_msg $"Starting exim and queuerunner (combined)"
-                       $DAEMON -bd "-q${QFLAGS}${QUEUEINTERVAL}" \
-                               "${COMMONOPTIONS}" "${QUEUERUNNEROPTIONS}" 
"${SMTPLISTENEROPTIONS}"
+                       $DAEMON -oP "${PIDFILE}" -bd 
"-q${QFLAGS}${QUEUEINTERVAL}"
+                               #"${COMMONOPTIONS}" "${QUEUERUNNEROPTIONS}" 
"${SMTPLISTENEROPTIONS}"
ok $?
;;
separate)
start_msg $"Starting exim"
-                       $DAEMON -bd "${SMTPLISTENEROPTIONS}" "${COMMONOPTIONS}"
+                       $DAEMON -oP ${PIDFILE} -bd "${SMTPLISTENEROPTIONS}" 
"${COMMONOPTIONS}"
ok $?
start_msg $"Starting exim queuerunner"
$DAEMON -oP "$QRPIDFILE" \
@@ -50,7 +50,8 @@ rc_start()
;;
no|ppp)
start_msg $"Starting exim (noqueue)"
-                       $DAEMON -bd "${SMTPLISTENEROPTIONS}"
+                       $DAEMON -oP "${PIDFILE}" -bd "${SMTPLISTENEROPTIONS}"
+                       ok $?
;;
nodaemon)
;;
@@ -59,27 +60,35 @@ rc_start()

rc_status()
{
-       echo "Not implemented"
-#      status_msg $"Exim is"
-#      if ! ls /proc/sys/fs/binfmt_misc/windows* &>/dev/null; then
-#              ok 998
-#      else
-#              ok 997
-#      fi
+       pid='x'
+       qrpid='x'
+       [ -f ${PIDFILE} ] && pid=`cat ${PIDFILE}`
+       [ -f ${QRPIDFILE} ] && qrpid=`cat ${QRPIDFILE}`
+       status_msg $"Exim is"
+       if [ -d /proc/$pid -o -d /proc/$qrpid ]; then
+               ok 997
+       else
+               ok 998
+       fi
}

rc_stop()
{
stop_msg $"Stopping exim"
-       if [ -f "$QRPIDFILE" ]; then
+       ret=1
+       if [ -f $QRPIDFILE ]; then
qrpid=`cat $QRPIDFILE`
kill $qrpid
+               ret=$?
+               rm ${QRPIDFILE}
fi
-       if [ -f "$PIDFILE" ]; then
+       if [ -f $PIDFILE ]; then
pid=`cat $PIDFILE`
kill $pid
+               ret=$?
+               rm ${PIDFILE}
fi
-       ok $?
+       ok $ret
}

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

Reply via email to