Date: Thu, 15 Jan 1998 10:37:51 +1030 From: Greg Lehey <grog@lemis.com> To: stephen farrell <stephen@farrell.org> Cc: michael dorin <mike@chaski.com>, questions@FreeBSD.ORG Subject: Re: smtp restarting after changes to sendmail.* Message-ID: <19980115103751.40881@lemis.com> In-Reply-To: <8767nnf51i.fsf@phaedrus.uchicago.edu>; from stephen farrell on Wed, Jan 14, 1998 at 09:28:57AM -0600 References: <199801140606.GAA00312@chaski.com> <8767nnf51i.fsf@phaedrus.uchicago.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 14, 1998 at 09:28:57AM -0600, stephen farrell wrote: > michael dorin <mike@chaski.com> writes: > >> How do I restart smtp without rebooting after I change the sendmail >> files? > > In my opinion this is a benefit of sysV way of doing things over > BSD--under solaris, e.g., you do /etc/init.d/sendmail stop; > /etc/init.d/sendmail start and you don't have to worry about flags and > so on. No, instead you have to worry about the name of the file. Even if you can remember it, it's a lot more to type. If I try that on my System V box (IRIX 5.3), I get: # /etc/init.d/sendmail stop bash: /etc/init.d/sendmail: No such file or directory In other words, it's not a universal solution. IRIX 5.3 *does* have a directory /etc/init.d with the kind of scripts you describe, but it doesn't include sendmail. > Unless I'm sadly mistaken and need to take myself out and shoot > myself, under freebsd you need to > (a) ps -auxx and find the sendmail process and kill it (or use > killall, which I never think of b/c I use solaris so much, and > killall in solaris does something totally immoral) Yes. This is the same procedure for just about every daemon. > (b) check the flags for sendmail in /etc/rc.conf, No. > and then (c) run sendmail (which is in /usr/sbin) with those flags. > (of course you quickly learn /usr/sbin/sendmail -bd -q1h). Again, no. You send it a SIGHUP: # ps auxx | grep sendmail root 14683 0.8 0.5 264 472 p9 S+ 10:33AM 0:00.02 grep sendmail root 7810 0.0 0.4 596 332 ?? Is 11:52AM 0:01.81 sendmail: accepting connections on port 25 (sendmail) # kill -1 7810 My Sun box just died, so I can't confirm that this is what /etc/init.d/sendmail restart does, but I strongly suspect it. This difference in approach is one of the big differences between System V and BSD. In BSD, you go out and do it. In System V, you find a script which does it for you, and you may spend more time looking for the script and how to use it than it would have taken you to do the job in the first place. To make a point, I've just found the script on my IRIX box. It's called /etc/init.d/mail, not /etc/init.d/sendmail. It's too long to quote here, but it doesn't send a SIGHUP (which is the correct way to do it). You need to do a 'stop' followed by a 'start'. I can't see any merit in this approach. Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980115103751.40881>