[Techtalk] .sig problems

Poppy Casper poppy at bluegirl.homelinux.net
Thu Sep 5 07:02:15 EST 2002


I picked up a random signature generator that looks like it does
everything I want - allows multiple lines, allows a consistant piece of
text, etc.

Problem is, it doesn't seem to work. I've narrowed it down to two
variables that aren't being set correctly: $homedir and $sigfile
(I've tried writing a brief script to set these variables the same as
below, and then printing them, and I get nothing. Either I'm not
including something I need to be including or the getpwuid lines don't
work)

Here is the section of the rc file that defines the variables:

#***********************************************************
# I like to setup variables for each of the mailboxes that
# I use in my @FILES array.  This makes the @FILES array
# easier/faster to read and manipulate.

$username       = (getpwuid($<))[0];
$homedir        = (getpwuid($<))[7];
$maildir        = "$homedir/mail";

if (-e "$homedir/Maildir" && -d "$homedir/Maildir") {
        $inbox  = "$homedir/Maildir/";
} elsif (-e "$homedir/Mailbox") {
        $inbox  = "$homedir/Mailbox";
} else {
        $inbox  = "/var/spool/mail/$username";
}
$sentmail       = "$maildir/sent-mail";     # Normal mail box.
$mailbox1       = "$maildir/saved-messages.gz";   # Gzipped mail box.
$mailbox2       =
"$maildir/saved-messages-$current_year-$current_month/";

*********************************************************
And the section of the script where's it's bombing:

if ($opt_t || $opt_p || ($lastreadtime > $prev_lastreadtime)) {
	open (SIGNATURE, "> $SIGFILE") or die "can't write $SIGFILE:$!";      

**************************************************************************
If anyone can suggest something that I'm not seeing, I'd appreciate it.
Been tearing my hair out, and spending more time trying to figure it out
than I can afford to take from my other projects.

--Poppy

-- 
 



More information about the Techtalk mailing list