WWHHHYYY?!?!
so i get back from leave to a server that mysteriously is acting weird. had the other admin give the root password to people “fixing” stuff and i get back to the following…
apache mysteriously died…sendmail doesn’t want to start up. i take a closer look.
server1:/# /etc/init.d/sendmail start
Starting Mail Transport Agent: sendmailstart-stop-daemon: stat /usr/sbin/sendmail-mta: No such file or directory (No such file or directory)
/etc/init.d/sendmail: line 256: /usr/sbin/sendmail-msp: No such file or directory
i think to myself, what the hell…then i check to see if it is there…
server1:/# ls -lsa /usr/sbin/sendmail-mta
0 lrwxrwxrwx 1 root root 30 2007-10-10 14:32 /usr/sbin/sendmail-mta -> /etc/alternatives/sendmail-mta
yep, there it is…but it’s a symbolic link to another file…let’s see if it is there…
server1:/# ls -lsa /etc/alternatives/sendmail-mta
ls: /etc/alternatives/sendmail-mta: No such file or directory
eeerrrr…okay…that explain that..but
server1:/# ls -lsa /etc/alternatives/
ls: /etc/alternatives/: No such file or directory
oh hell no…you did not just give me that!
so i’m sitting there and wondering…wtf…so i decided to do the following…
mkdir /etc/alternatives
server1:/# update-alternatives –display sendmail-mta
sendmail-mta – status is auto.
link currently absent
/usr/lib/sm.bin/sendmail – priority 25
slave mailq: /usr/share/sendmail/mailq
slave aliases.5.gz: /usr/share/man/man5/aliases.sendmail.5.gz
slave mailq.1.gz: /usr/share/man/man1/mailq.sendmail.1.gz
slave sendmail-mta.8.gz: /usr/share/man/man8/sendmail.sendmail.8.gz
slave newaliases.8.gz: /usr/share/man/man8/newaliases.sendmail.8.gz
slave newaliases: /usr/share/sendmail/newaliases
slave runq: /usr/share/sendmail/runq
slave runq.8.gz: /usr/share/man/man8/runq.sendmail.8.gz
Current `best’ version is /usr/lib/sm.bin/sendmail.
server1:/# update-alternatives –config sendmail-mta
There is only 1 program which provides sendmail-mta
(/usr/lib/sm.bin/sendmail). Nothing to configure.
and
server1:/# update-alternatives –display sendmail-msp
sendmail-msp – status is auto.
link currently absent
/usr/lib/sm.bin/sendmail – priority 25
slave sendmail-msp.8.gz: /usr/share/man/man8/sendmail.sendmail.8.gz
slave sendmail: /usr/lib/sm.bin/sendmail
slave sendmail.8.gz: /usr/share/man/man8/sendmail.sendmail.8.gz
slave lib.sendmail: /usr/lib/sm.bin/sendmail
Current `best’ version is /usr/lib/sm.bin/sendmail.
server1:/# update-alternatives –config sendmail-msp
There is only 1 program which provides sendmail-msp
(/usr/lib/sm.bin/sendmail). Nothing to configure.
and finally
server1:/# /etc/init.d/sendmail restart
Restarting Transport Agent: sendmail.
now see if it works…
server1:/# telnet localhost 25
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
220 localhost ESMTP Sendmail 8.13.8/8.13.8/Debian-3; Mon, 29 Dec 2008 14:17:21 +0200; (No UCE/UBE) logging access from: localhost(OK)-root@localhost [127.0.0.1]
so my question is…how and why did linux manage to lose the /etc/alternatives directory??
now i’m sitting with a couple of files that were pointing to the /etc/alternatives directory that are broken.
will probably use the same method to fix them…
update-alternatives –display “filename”
and
update-alternatives –config “filename”







Leave a Reply