sendmail
Antonio Olivares
olivares14031 at yahoo.com
Wed Jul 9 22:42:38 UTC 2008
--- On Wed, 7/9/08, Todd Zullinger <tmz at pobox.com> wrote:
> From: Todd Zullinger <tmz at pobox.com>
> Subject: Re: sendmail
> To: fedora-list at redhat.com
> Date: Wednesday, July 9, 2008, 2:06 PM
> Antonio Olivares wrote:
> > --- On Tue, 7/8/08, Tim
> <ignored_mailbox at yahoo.com.au> wrote:
> >>> [root at localhost 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.
>
> This is because you're running the script without any
> arguments.
> Lines 14 and 26 both test the second argument as a string,
> like:
>
> [ $2 == "up" ]
>
> Since you provided no second argument, $2 is empty and
> you've
> basically done this:
>
> [ == "up" ]
>
> Which causes the error. You can make the script more
> robust by
> quoting the $2 in the tests:
>
> [ "$2" == "up" ]
>
> That will only prevent the bash error, not make the script
> do anything
> when run without the proper arguments. IIRC,
> NetworkManager scripts
> are called with 2 arguments, the interface (e.g. eth0 or
> wlan0) and
> it's status (e.g. up or down).
>
> --
> Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL:
> www.pobox.com/~tmz/pgp
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks Todd,
I will change the arguments. but I have NetWorkManager running, but it does not interfere with the connection. There an "eth0", but there is no ethernet cable, I do not bring up the network upon boot. I start a connection with wvdial and then I end the session with CTRL+C.
If I do a ifconfig -a I get something like
root at lcoalhost:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:40:f4:53:5a:ab
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:10 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)
ppp0 Link encap:Point-to-Point Protocol
inet addr:66.201.8.16 P-t-P:66.201.8.6 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:813 errors:0 dropped:0 overruns:0 frame:0
TX packets:883 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:591676 (577.8 KiB) TX bytes:167245 (163.3 KiB)
root at lcoalhost:~$
But I get different numbers when connecting. The resolv.conf file is the same all the time
root at localhost:~# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT7072000
--> Waiting for carrier.
ATDT7072000
CONNECT 36000 V42bis
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Wed Jul 9 17:29:58 2008
--> Pid of pppd: 32433
--> Using interface ppp0
--> pppd: è[06][08][10]06][08]
--> pppd: è[06][08][10]06][08]
--> pppd: è[06][08][10]06][08]
--> pppd: è[06][08][10]06][08]
--> local IP address 66.201.8.16
--> pppd: è[06][08][10]06][08]
--> remote IP address 66.201.8.6
--> pppd: è[06][08][10]06][08]
--> primary DNS address 66.201.0.203
--> pppd: è[06][08][10]06][08]
--> secondary DNS address 66.94.120.9
--> pppd: è[06][08][10]06][08]
I thought I should turn off NetWorkManager, but since it does not interfere with connection, I left it on. In Fedora 8, I turned it off and Fedora 7 as well. On wired connections from school, I failed to update linux counter with their script even with cron job. I wondered sometimes if it was their server that was down, or fedora that refused to send the message.
Thanks for helping.
Regards,
Antonio
More information about the users
mailing list