diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-12-09 09:07:37 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-12-09 09:07:37 +0000 |
commit | c41147feae7509b78e299d2d637943204f02690d (patch) | |
tree | abacb58bf9ad275539f61bd11f9b935e303befcb /mail/sympa/files | |
parent | 89c28ec27827819d22c2301248400da2ff9ebcfd (diff) | |
download | ports-c41147feae7509b78e299d2d637943204f02690d.tar.gz ports-c41147feae7509b78e299d2d637943204f02690d.zip |
Notes
Diffstat (limited to 'mail/sympa/files')
-rw-r--r-- | mail/sympa/files/patch-check_perl_modules.pl | 20 | ||||
-rw-r--r-- | mail/sympa/files/patch-src-etc-script-sympa | 84 |
2 files changed, 104 insertions, 0 deletions
diff --git a/mail/sympa/files/patch-check_perl_modules.pl b/mail/sympa/files/patch-check_perl_modules.pl new file mode 100644 index 000000000000..c04ce9783058 --- /dev/null +++ b/mail/sympa/files/patch-check_perl_modules.pl @@ -0,0 +1,20 @@ +--- check_perl_modules.pl 2003/11/28 18:16:39 ++++ check_perl_modules.pl 2003/12/08 22:37:28 +@@ -155,6 +162,8 @@ + sub install_module { + my ($module, $default) = @_; + ++ return if $ENV{'PERL_EXTUTILS_AUTOINSTALL'} =~ /--skip|--default/; ++ + unless ($ENV{'FTP_PASSIVE'} eq 1) { + $ENV{'FTP_PASSIVE'} = 1; + print "Setting FTP Passive mode\n"; +@@ -171,7 +180,7 @@ + print "Install module $module ? [$default]"; + my $answer = <STDIN>; chomp $answer; + $answer ||= $default; +- next unless ($answer =~ /^y$/i); ++ return unless ($answer =~ /^y$/i); + CPAN::Shell->conf('inactivity_timeout', 4); + CPAN::Shell->install($module); + } diff --git a/mail/sympa/files/patch-src-etc-script-sympa b/mail/sympa/files/patch-src-etc-script-sympa new file mode 100644 index 000000000000..c3a70f43cbb6 --- /dev/null +++ b/mail/sympa/files/patch-src-etc-script-sympa @@ -0,0 +1,84 @@ +--- src/etc/script/sympa 2003/11/28 18:16:39 ++++ src/etc/script/sympa 2003/12/02 16:32:40 +@@ -30,6 +30,8 @@ + sympaconf="--CONFIG--" + wwsympaconf="--WWSCONFIG--" + ++lockdir="--LOCKDIR--" ++ + ##'echo -n' not supported with SH on Solaris + if [ ${OSTYPE} = "solaris" ]; then + echo_opt="" +@@ -37,6 +39,10 @@ + echo_opt="-n" + fi + ++if [ ${OSTYPE} = "FreeBSD" ]; then ++ lockdir="/var/spool/lock" ++fi ++ + # End of parameters + + # Current state of the module +@@ -55,7 +61,7 @@ + if [ -f --PIDDIR--/$1.pid ] ; then + pid=`head -1 --PIDDIR--/$1.pid` + if [ "$pid" != "" ] ; then +- running=`ps -A | grep "$pid"` ++ running=`ps -ax | grep perl | grep $pid` + if [ "$running" != "" ]; then + echo "$1 (pid $pid) is active..." + return 0 +@@ -83,8 +89,8 @@ + # startparam="" + # fi + +- if [ ${OSTYPE} = "IRIX" ]; then +- $sympadir/$1.pl $startparam && echo "success" || echo "failure" ++ if [ ${OSTYPE} = "IRIX" -o ${OSTYPE} = "FreeBSD" ]; then ++ su sympa -c "$sympadir/$1.pl $startparam" && echo "success" || echo "failure" + else + $sympadir/$1.pl $startparam && success || failure + fi +@@ -139,7 +145,7 @@ + if [ -f --PIDDIR--/$1.pid ]; then + echo $echo_opt "Stopping module $1.pl: " + pid=`head -1 --PIDDIR--/$1.pid` +- running=`ps -A | grep "$pid"` ++ running=`ps -ax | grep perl | grep "$pid"` + if [ "$running" != "" ]; then + if [ ${OSTYPE} = "IRIX" ]; then + kill -TERM $pid && echo "success" || echo "failure" +@@ -175,13 +181,13 @@ + # See how we were called. + case "$1" in + start) +- if [ ! -f --LOCKDIR--/sympa ]; then ++ if [ ! -f "$lockdir/sympa" ]; then + echo "Starting Sympa subsystem: " + sympa_start sympa + sympa_start archived + sympa_start bounced + sympa_start task_manager +- touch --LOCKDIR--/sympa ++ touch "$lockdir/sympa" + echo + else + +@@ -196,13 +202,13 @@ + sympa_stop archived + sympa_stop sympa + sympa_stop task_manager +- if [ -f --LOCKDIR--/sympa ]; then +- rm -f --LOCKDIR--/sympa ++ if [ -f "$lockdir/sympa" ]; then ++ rm -f "$lockdir/sympa" + fi + ;; + status) + echo "Status of Sympa subsystem: " +- if [ -f --LOCKDIR--/sympa ]; then ++ if [ -f "$lockdir/sympa" ]; then + echo "Status file for subsystem found." + else + echo "Status file for subsystem NOT found." |