Browse Source

Dimitar Zhekov:

fixed nullmailer daeminizing behaviour


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2463 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Dimitar Zhekov 21 years ago
parent
commit
e88c017429
4 changed files with 3 additions and 54 deletions
  1. +0
    -2
      package/jimmy/nullmailer/config.in
  2. +0
    -47
      package/jimmy/nullmailer/daemon.diff
  3. +0
    -3
      package/jimmy/nullmailer/nullmailer.conf
  4. +3
    -2
      package/jimmy/nullmailer/nullmailer.init

+ 0
- 2
package/jimmy/nullmailer/config.in

@ -25,8 +25,6 @@ then
menu_begin MENU_PKG_NULLMAILER 'Nullmailer Options'
bool 'Send all local mail to a local mbox' \
ROCKCFG_PKG_NULLMAILER_LOCALQUEUE 0
bool 'Add self-daemonizing behavior' \
ROCKCFG_PKG_NULLMAILER_DAEMONIZE 1
menu_end
fi

+ 0
- 47
package/jimmy/nullmailer/daemon.diff

@ -1,47 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/jimmy/nullmailer/daemon.patch
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./src/send.cc.orig 2003-01-03 22:58:31.000000000 +0200
+++ ./src/send.cc 2003-06-15 10:06:30.000000000 +0300
@@ -319,10 +319,19 @@
signal(SIGHUP, SIG_IGN);
load_config();
load_files();
- for(;;) {
+ if(pausetime == 0)
send_all();
- if (pausetime == 0) break;
- do_select();
+ else {
+ switch(fork()) {
+ case 0:
+ for(;;) {
+ send_all();
+ do_select();
+ }
+ case -1:
+ fout << "Could not fork main send message loop." << endl;
+ return 1;
+ }
}
return 0;
}

+ 0
- 3
package/jimmy/nullmailer/nullmailer.conf

@ -56,6 +56,3 @@ prepatch=nullmailer_prepatch
premake=nullmailer_premake
postmake=nullmailer_postmake
if [ "$ROCKCFG_PKG_NULLMAILER_DAEMONIZE" == "1" ]; then
var_append patchfiles $confdir/daemon.diff
fi

+ 3
- 2
package/jimmy/nullmailer/nullmailer.init

@ -22,15 +22,16 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
#
# Desc: the SMTP server
# Desc: SMTP send-only daemon
# Runlevel: 25 rcX
#
main_begin
block_begin(start, `Starting nullmailer-send.')
check(`D_prefix/sbin/nullmailer-send')
D_prefix/sbin/nullmailer-send &
sleep 1
check(`pidof D_prefix/sbin/nullmailer-send > /dev/null')
block_end
block_begin(stop, `Stopping nullmailer-send.')

Loading…
Cancel
Save