On Tue, 2008-07-08 at 22:30 -0700, Antonio Olivares wrote: > I have had some problems trying to update a machine with sendmail. I > have applied your script but changed the ntpd service to sendmail. > > I have NetworkManager running, but it does not do anything. I use > dialup to connect and technically do not use it. I ran the modified > script with sendmail in place of ntpd and I got > > [EMAIL PROTECTED] Documents]# ./sendmail-script > ./sendmail-script: line 14: [: ==: unary operator expected > ./sendmail-script: line 26: [: ==: unary operator expected
Show us the script that you're using. But the problem's most likely down to you expecting to run stand-alone. When the network manager dispatcher runs the script, it runs it with two parameters, the name of the interface, and its status. You should do the same if running it manually. i.e. sendmail-script eth0 down > [EMAIL PROTECTED] ~]# mailq > /var/spool/mqueue (5 requests) > -----Q-ID----- --Size-- -----Q-Time----- > ------------Sender/Recipient----------- > m695ImTl015224 4997 Wed Jul 9 00:18 <[EMAIL PROTECTED]> > (Deferred: Connection timed out with beth.counter.li.org.) > <[EMAIL PROTECTED]> > m652mvBl022327* 50 Fri Jul 4 21:48 <[EMAIL PROTECTED]> > (host map: lookup (gmail.com): deferred) > <[EMAIL PROTECTED]> > m652PGXN021917 5094 Fri Jul 4 21:25 <[EMAIL PROTECTED]> > (host map: lookup (counter.li.org): deferred) > <[EMAIL PROTECTED]> > m652nEUF022367 5094 Fri Jul 4 21:49 <[EMAIL PROTECTED]> > (host map: lookup (counter.li.org): deferred) > <[EMAIL PROTECTED]> > m652ikWX022255 15 Fri Jul 4 21:44 <[EMAIL PROTECTED]> > (host map: lookup (gmail.com): deferred) > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > Total requests: 5 That's exactly the sort of thing that I was seeing when sendmail wasn't able to use my network, because the network came alive *after* sendmail started up. Even logwatch mails sent to [EMAIL PROTECTED] failed. It's been quite some time since I used dialup, but it had a similar feature to the dispatcher: When the ppp connection was made, the dialup system would also run a script, if it found one, at a known location. I think the user scripts were /sbin/ifup-local & /sbin/ifdown-local (for post scripts) and they'd be called by /etc/sysconfig/network-scripts/ifup-post & /etc/sysconfig/network-scripts/ifdown-post. And there were /sbin/ifup-pre-local & /sbin/ifdown-pre-local for doing things before the interfaces were pulled up and down. Start by reading the /sbin/ifup and /sbin/ifdown scripts, and read all the other scripts that they refer to. There's a chain of events that happen when the interfaces go up or down. -- [EMAIL PROTECTED] ~]$ uname -r 2.6.25.9-76.fc9.i686 Don't send private replies to my address, the mailbox is ignored. I read messages from the public lists. -- fedora-list mailing list [email protected] To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
