minix/commands/reboot
Lionel Sambuc 9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00
..
halt.c retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00
log.c mainstream-format fstab format 2011-11-14 14:47:28 +00:00
Makefile Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
README Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
sh_wall.c retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00
shutdown.c retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00
wtmp.h mainstream-format fstab format 2011-11-14 14:47:28 +00:00

This a new implementation of a shutdown procedure. It allows 
the system to go down graciously with informing the
users. This package contains 3 programs:

- halt = Immediately stop the system, no info to users
- shutdown = Inform users, close down the system properly
- wall = Vincent Archer's implementation of wall (Write all)

Installing

Shutdown and halt use a new systemcall, which I've added to
MM. Therefor there are several diff's which should be applied:

callnr.hd - New callnr for reboot(2)
	   Diff against /usr/include/minix/callnr.h.
	   Those of you using a symlink package should
	   change the number and mm/table.c into a free
	   number. I used 54, LSTAT.
param.hd - Defines reboot_flag as a part of the messages
proto.hd - Add's prototype for do_reboot()
table.cd - Interpretation of the systemcall to MM
mm.cd -	   I have added the do_reboot code to mm/getset.c but
	   I couldn't find a getset.c to create a useable diff :-(
	   So you can add where you want it. It is pure code, no diff.

Now edit log.c and search for ``host''. Change this into your
systemname or make it empty.

Shutdown and halt log their actions in /usr/adm/log, edit the
makefile and undefine -DLOG if you don't want this (this at the end of
the makefile). You can change SHUT_LOG in shutdown.c and log.c if you
want it in another file.

Then type a `make'. This will take a minute or so (13 sec. with bcc :-).
Remember to build a new image and update the ps_database.

Type `make install' to place the program's where I've got them.
Use them, try them and let me now if you've got problems running
something.

I have tested to sources both on 16-bits and 32-bits MINIX. I have compiled
it with gcc, bcc and ACK, so that shouldn't really give a problem. Maybe
the standard MINIX-make chokes on the makefile, atleast mine did.

NOTE:
	Make install does not place the man-pages somewhere. You should
	do this yourself.

--
Edvard Tuinder        ed@pulstar.NL.mugnet.org    v892231@si.hhs.NL
Student Computer Science
Haagse Hogeschool, The Hague, The Netherlands