From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,c495d349a299fd95 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-06-27 06:23:21 PST Path: bga.com!news.sprintlink.net!hookup!usc!elroy.jpl.nasa.gov!decwrl!crl.dec.com!crl.dec.com!nntpd.lkg.dec.com!alingo.zk3.dec.com!werme From: werme@alingo.zk3.dec.com (Eric Werme) Newsgroups: comp.unix.osf.osf1 Subject: Re: Does 'shutdown' really shutdown? Date: 27 Jun 1994 13:18:49 GMT Organization: Digital Equipment Corporation Message-ID: <2umjjp$nn3@nntpd.lkg.dec.com> References: <2ubec7Ebqk@uni-erlangen.de> Reply-To: werme@zk3.dec.com NNTP-Posting-Host: alingo.zk3.dec.com To: peter@nmti.com In comp.unix.osf.osf1 you write: >In article , >Eric Werme wrote: >> I'm not completely certain how the shutdown stuff really works, but >> "shutdown -r" runs reboot *after* running rc0.d/K*. >I hate like hell to contradict you, since you're at DEC, but I think >you're wrong. No problem. Ask me something about NFS. One thing I like to do with the rc3 script is print the name of the script it is about to execute. You might want to do the same with the rc0 script: # Kill procedures for f in /sbin/rc0.d/K* do add ---> echo -------- $f if [ -s $f ]; then /sbin/sh $f stop fi done >*however*, we've had problems in the past where shutdown -r didn't properly >run rc0. I don't recall seeing that roll by in the bug reports. You might want to talk to Customer Support about it. > In addition, examining shutdown with "strings" shows that it's >calling "/sbin/reboot" directly. Like I said ""shutdown -r" runs reboot...." >(It also shows an amazing amount of stuff statically linked in the > executable, including prompts from programs like "passwd". What > gives?) Well, everything in /sbin is linked statically. Shutdown has to write in the syslog file and includes the user's name. That drags in code that deals with /etc/passwd, and I'd guess one of the modules has a routine that shutdown doesn't call, but does includes a call to the routine that changes passwords. We've never had the time to clean up all those nits. Look at "/usr"/sbin/shutdown for a variant that uses the shared library - there's a lot less extra stuff. -- Eric (Ric) Werme | werme@zk3.dec.com Digital Equipment Corp. | This space intentionally left blank.