On Thursday, April 12 at 08:08 PM, quoth Charles Cazabon:
Kyle Wheeler <kyle-qmail@memoryhole.net> wrote:
Does anyone have any idea what possible reasons a wrapper script might
have for refusing to run like this?
Most common cause I've seen is trailing whitespace (space or CR) on the
shebang line, or some other corruption of it. I suppose you've looked at it
with `cat -veT`?
I hadn't thought of that, good to know! Unfortunately, it doesn't seem
to reveal anything obvious...:
#!/bin/bash$
echo "alive!" >> /tmp/send.log$
DOMAIN="memoryhole.net"$
DKREMOTE="/var/qmail/$DOMAIN/bin/qmail-remote.orig"$
DKSIGN="/etc/domainkeys/$DOMAIN/default"$
[ "$1" != "kyle@memoryhole.net" ] && exec "$DKREMOTE"$
#tmp=`/bin/mktemp -t dk.sign.XXXXXXXXXXXXXXXXXXX 2>>/tmp/send.log`$
tmp="/tmp/dksign.$PID.$$"$
echo "created file $tmp" >> "/tmp/send.log"$
/bin/cat - >"$tmp"$
echo "saved message" >> /tmp/send.log$
( /usr/local/bin/dktest -s "$DKSIGN" -c nofws -h <"$tmp" 2>>/tmp/send.log | \$
^I/bin/sed 's/; d=.*;/; d='"$DOMAIN"';/' 2>>/tmp/send.log; \$
^I/bin/cat "$tmp" 2>>/tmp/send.log) | \$
^I"$DKREMOTE" "$@" 2>>/tmp/send.log$
retval=$?$
echo "called dkremote with return value $retval" >> /tmp/send.log$
/bin/rm "$tmp"$
exit $retval$
~Kyle
--
Science has proof without any certainty. Creationists have certainty
without any proof.
-- Ashley Montague
pgpibRdlS1x6u.pgp
Description: PGP signature
|