yeah, but not much more use. So I downloaded the source, and see that in
halt.c the halt/poweroff command creates them. do_shutdown just calles
shutdown.
if (c != '0' && c != '6') {
char *file;
if (do_poweroff) {
file = strdup("/poweroff");
} else {
file = strdup("/halt");
}
close(open(file, O_CREAT|O_RDWR, 0644));
free(file);
do_shutdown(do_reboot ? "-r" : "-h", tm);
}
So that answers that, but I have forgotten the orignal issue. How/when is
/etc/rc.d/init.d/halt called? We know that calling halt -p or poweroff
will do what we want, and calling shutdown will not (unless the /poweroff
file is created), but I don't recall how we got started with this one :)
My 6.2 box has a /usr/bin/shutdown script that seems to make all thsi work
ok - maybe this is the critical difference, as on my 7.0 box
/sbin/shutdown gets called directly instead.
charles
On Fri, 27 Oct 2000, Rick Warner wrote:
>
>
> Using a combination of find, grep, and strings, the following are the only
> files that reference /poweroff:
>
> /etc/rc.d/rc.sysinit
> /etc/rc.d/init.d/halt
> /usr/share/doc/initscripts-5.49/ChangeLog
> /usr/share/doc/SysVinit-2.78/changelog
>
> The latter two may be the most useful.
>
> - rick warner
>
> On Fri, 27 Oct 2000, Larry Grover wrote:
>
> > I found the answer to one of these questions myself:
> >
> > rc.sysinit (line 540) rm's /halt, /poweroff, and a few other files that might be
>lying around.
> >
> > But I haven't found out what creates these files during shutdown. Does anyone
>know?
> >
> > __
> > Larry Grover, PhD
> > Assoc Prof of Physiology
> > Marshall Univ Sch of Med
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list