fi
done # Iterate package range
done # Iterate package range list
+
+ # Do not repeat after installing all packages if -y is specified
+ [ "$YESMODE" ] && cont=n
done
rm -f $TMPDIR/.* # Remove any remaining .postinstall script or .list*
--- /dev/null
+.TH MKDEP 1 "February 1st, 2010"\r
+.SH NAME\r
+mkdep \- print depencies in the Right Way for make(1)\r
+.SH SYNOPSIS\r
+.B mkdep \r
+.I path\r
+.br\r
+.B mkdep \r
+.I pp_command\r
+.IR sourcefile " ... "\r
+.SH DESCRIPTION\r
+.B Mkdep\r
+does what \r
+.B cpp -M\r
+should do, but no compiler gets it right, they all\r
+strip the leading path of the \fI*.o\fP files.\r
+.PP\r
+The first synopsis form just creates the needed\r
+.I .depend\r
+files in all the subdirectories of\r
+.IR path .\r
+.PP\r
+The second synopsis form does the hard work of emitting the\r
+dependencies instructions for\r
+.IR sourcefile\r
+in the right format expected by\r
+.IR make (1),\r
+including the path information.\r
+.PP\r
+.B Mkdep\r
+expects\r
+.I pp_command\r
+to be the correct invocation for the preprocessor\r
+.\" FIXME: there are no cpp(1x) manpage presently...\r
+.\" .IR cpp (1x)\r
+command adequate for\r
+.IR sourcefile ,\r
+and also expects this command to emit lines of the form\r
+.nf\r
+.ta +1i +\w'# lineno "filename"'u+2m\r
+ # \fIlineno\fP "\fIfilename\fP"\r
+.fi\r
+for each files which is included by the named\r
+.IR sourcefile .\r
+.PP\r
+For C, the typical idiom is to add in all your\r
+.IR Makefile s:\r
+.PP\r
+.nf\r
+.ta +0.2i +\w'depend:'u+1m +\w'mkdep "$(CC) -E $(CPPFLAGS)" *.c > .depend'u+2m\r
+ depend: \r
+ cd sub1 && $(MAKE) -$(MAKEFLAGS) $@\r
+ cd sub2 && $(MAKE) -$(MAKEFLAGS) $@\r
+ # repeat for each subdirectory\r
+ mkdep "$(CC) -E $(CPPFLAGS)" *.c > .depend \r
+.PP\r
+ # Include generated dependencies.\r
+ include .depend \r
+.PP\r
+.fi \r
+.SH "SEE ALSO"\r
+.BR cc (1),\r
+.BR make (1).\r
+.SH BUGS\r
+Since\r
+.I Makefile\r
+is read in full before any command is executed,\r
+there is no way to prevent\r
+.IR make (1)\r
+to report an error if the\r
+.I .depend\r
+file was not created beforehand; hence the first form of\r
+.IR mkdep\r
+should be used \fBbefore\fP any attempt is done to use this feature in any\r
+.IR Makefile .\r
+.PP\r
+The current version hardcodes the \fI.o\fP suffix, so it cannot be used for e.g.\r
+.IR flex (1)\r
+or \r
+.IR yacc (1)\r
+source files.\r
+.SH AUTHOR\r
+.I Mkdep.c \r
+was written by Kees J. Bot and Jorrit N. Herder. \r
+.\" This manual page by A. Leca, last revised 2010-02-01.\r
.TP
.B K
The process is killed if the signal is not caught. If the signal is received
-while ignored or masked, the process is killed even if a handler is defined to
-catch the signal.
+due to an exception while ignored or masked, the process is killed even if a
+handler is defined to catch the signal.
.TP
.B c
The signal causes a core dump.
--- /dev/null
+.TH CDPROBE 8 "February 1st, 2010"\r
+.SH NAME\r
+cdprobe \- guess where the Minix CD is\r
+.SH SYNOPSIS\r
+.B cdprobe\r
+.SH DESCRIPTION\r
+.B Cdprobe\r
+prints on standard output the name of the device (in\r
+.BI /dev/c X d Y\r
+form) of a device containing a CD with the proper layout to install Minix from it.\r
+.br\r
+Such a CD should have a MINIX cd label,\r
+an IBM-format partition table at the beginning (like any hardisk),\r
+and the file systems pointed to at positions\r
+.IR p1\r
+and\r
+.IR p2\r
+of that partition table, should be valid (mountable) Minix file systems.\r
+.SH DIAGNOSTICS\r
+The return code is\r
+.B 0\r
+after successfully printing the device, or\r
+.B 1\r
+if some error or unexpected condition occured.\r
+Appropriate diagnostic messages are printed on standard error. \r
+.SH NOTES\r
+.B Cdprobe\r
+probes all the possible drives on the system, so can try for a long time,\r
+particularly when there are no readable CD, or when the controller cannot be\r
+successfully addressed at hardware level.\r
+.SH BUGS\r
+There is some nasty hard-codery (like MINIX cd label) that can be improved on.\r
+.SH "SEE ALSO"\r
+.BR at (4),\r
+.BR /etc/rc \r
+on the initial ramdisk.\r
+.SH AUTHOR\r
+.I Cdprobe.c \r
+was written by Ben Gras and Philip Homburg. \r
+.\" This manual page by A. Leca, last revised 2010-02-01.\r
--- /dev/null
+.TH LOADRAMDISK 8 "February 1st, 2010"\r
+.SH NAME\r
+loadramdisk \- copy an image of a file system to /dev/ram\r
+.SH SYNOPSIS\r
+.B loadramdisk\r
+.IR file\r
+.SH DESCRIPTION\r
+.B Loadramdisk\r
+copies the content of a device or a file containing an image of a file system,\r
+specified by the\r
+.I file\r
+argument, to \fB/dev/ram\fP. This way the source is preserved\r
+untouched, and can resides on a read-only media like a CD, while the copied-to\r
+version may be mounted as read-write file system and used as root device.\r
+.SH NOTES\r
+A ramdisk can be initialized only once.\r
+.SH "SEE ALSO"\r
+.BR dev (4),\r
+.BR init (8),\r
+.BR mount (2),\r
+.BR newroot (8).\r
+.SH AUTHOR\r
+.I Loadramdisk.c \r
+was written by Philip Homburg. \r
+.\" This manual page by A. Leca, last revised 2010-02-01.\r
--- /dev/null
+.TH NEWROOT 8 "February 1st, 2010"\r
+.SH NAME\r
+newroot \- replace the current root with a new one\r
+.SH SYNOPSIS\r
+.B newroot\r
+.RB [ \-i ]\r
+.I block-special\r
+.SH OPTIONS\r
+.BR "\-i" " Copy mfs binary from boot image to memory"\r
+.SH DESCRIPTION\r
+.B Newroot\r
+causes the present \fB/\fP file system to be discarded and\r
+replaced by the one stored in the device indicated by\r
+.IR block-special .\r
+.PP\r
+The\r
+.B \-i\r
+option may be used to prevent loading the file system\r
+service for the new file system from disk. This is useful when\r
+for some reason the \fImfs\fP binary on disk malfunctions,\r
+rendering Minix unable to boot.\r
+.PP\r
+This command is normally used to replace the initial ramdisk\r
+loaded as part of the operating system, with the operational\r
+version stored on disk. As such, it should be invoked from the\r
+.B /etc/rc\r
+stored in the initial-ramdisk image.\r
+.SH NOTES\r
+.B Newroot\r
+should be used before any "real" use of the\r
+.IR mount (1)\r
+command.\r
+.SH "SEE ALSO"\r
+.BR init (8),\r
+.BR mount (1),\r
+.BR mount (2).\r
+.SH AUTHOR\r
+.I Newroot.c \r
+was written by Philip Homburg. \r
+.\" This manual page by A. Leca, last revised 2010-02-01.\r
set_alarm(rmp, rmp->mp_interval[ITIMER_REAL]);
else rmp->mp_flags &= ~ALARM_ON;
- check_sig(rmp->mp_pid, SIGALRM);
+ check_sig(rmp->mp_pid, SIGALRM, FALSE /* ksig */);
}
{
sn = (rmp->mp_trace_flags & TO_ALTEXEC) ? SIGSTOP : SIGTRAP;
- check_sig(rmp->mp_pid, sn);
+ check_sig(rmp->mp_pid, sn, FALSE /* ksig */);
}
new_sp= (char *)rmp->mp_procargs;
/* Tell the tracer, if any, about the new child */
if (rmc->mp_tracer != NO_TRACER)
- sig_proc(rmc, SIGSTOP, TRUE /*trace*/);
+ sig_proc(rmc, SIGSTOP, TRUE /*trace*/, FALSE /* ksig */);
/* Do not reply until FS is ready to process the fork
* request
/* Tell the tracer, if any, about the new child */
if (rmc->mp_tracer != NO_TRACER)
- sig_proc(rmc, SIGSTOP, TRUE /*trace*/);
+ sig_proc(rmc, SIGSTOP, TRUE /*trace*/, FALSE /* ksig */);
/* Wakeup the newly created process */
setreply(rmc-mproc, OK);
}
/* Send a hangup to the process' process group if it was a session leader. */
- if (procgrp != 0) check_sig(-procgrp, SIGHUP);
+ if (procgrp != 0) check_sig(-procgrp, SIGHUP, FALSE /* ksig */);
}
/*===========================================================================*
}
else {
/* Parent is not waiting. */
- sig_proc(p_mp, SIGCHLD, TRUE /*trace*/);
+ sig_proc(p_mp, SIGCHLD, TRUE /*trace*/, FALSE /* ksig */);
}
}
* Note that this may cause cascading exits.
*/
if (!(child->mp_flags & EXITING)) {
- sig_proc(child, SIGKILL, TRUE /*trace*/);
+ sig_proc(child, SIGKILL, TRUE /*trace*/, FALSE /* ksig */);
return;
}
* SIGKILL. So first kill, then reboot.
*/
- check_sig(-1, SIGKILL); /* kill all users except init */
- sys_stop(INIT_PROC_NR); /* stop init, but keep it around */
+ check_sig(-1, SIGKILL, FALSE /* ksig*/); /* kill all users except init */
+ sys_stop(INIT_PROC_NR); /* stop init, but keep it around */
/* Tell FS to reboot */
m.m_type = PM_REBOOT;
_PROTOTYPE( int do_kill, (void) );
_PROTOTYPE( int ksig_pending, (void) );
_PROTOTYPE( int do_pause, (void) );
-_PROTOTYPE( int check_sig, (pid_t proc_id, int signo) );
-_PROTOTYPE( void sig_proc, (struct mproc *rmp, int signo, int trace) );
+_PROTOTYPE( int check_sig, (pid_t proc_id, int signo, int ksig) );
+_PROTOTYPE( void sig_proc, (struct mproc *rmp, int signo, int trace,
+ int ksig) );
_PROTOTYPE( int do_sigaction, (void) );
_PROTOTYPE( int do_sigpending, (void) );
_PROTOTYPE( int do_sigprocmask, (void) );
{
/* Perform the kill(pid, signo) system call. */
- return check_sig(m_in.pid, m_in.sig_nr);
+ return check_sig(m_in.pid, m_in.sig_nr, FALSE /* ksig */);
}
/*===========================================================================*
id = proc_id;
break;
}
- check_sig(id, i);
+ check_sig(id, i, TRUE /* ksig */);
}
/* If SIGNDELAY is set, an earlier sys_stop() failed because the process was
/*===========================================================================*
* sig_proc *
*===========================================================================*/
-PUBLIC void sig_proc(rmp, signo, trace)
+PUBLIC void sig_proc(rmp, signo, trace, ksig)
register struct mproc *rmp; /* pointer to the process to be signaled */
int signo; /* signal to send to process (1 to _NSIG-1) */
int trace; /* pass signal to tracer first? */
+int ksig; /* non-zero means signal comes from kernel */
{
/* Send a signal to a process. Check to see if the signal is to be caught,
* ignored, tranformed into a message (for system processes) or blocked.
}
/* some signals cannot be safely ignored */
- badignore = sigismember(&noign_sset, signo) && (
+ badignore = ksig && sigismember(&noign_sset, signo) && (
sigismember(&rmp->mp_ignore, signo) ||
sigismember(&rmp->mp_sigmask, signo) ||
sigismember(&rmp->mp_sig2mess, signo));
/*===========================================================================*
* check_sig *
*===========================================================================*/
-PUBLIC int check_sig(proc_id, signo)
+PUBLIC int check_sig(proc_id, signo, ksig)
pid_t proc_id; /* pid of proc to sig, or 0 or -1, or -pgrp */
int signo; /* signal to send to process (0 to _NSIG-1) */
+int ksig; /* non-zero means signal comes from kernel */
{
/* Check to see if it is possible to send a signal. The signal may have to be
* sent to a group of processes. This routine is invoked by the KILL system
* signal may be caught, blocked, ignored, or cause process
* termination, possibly with core dump.
*/
- sig_proc(rmp, signo, TRUE /*trace*/);
+ sig_proc(rmp, signo, TRUE /*trace*/, ksig);
if (proc_id > 0) break; /* only one process being signaled */
}
if (sigismember(&rmp->mp_sigpending, i) &&
!sigismember(&rmp->mp_sigmask, i)) {
sigdelset(&rmp->mp_sigpending, i);
- sig_proc(rmp, i, FALSE /*trace*/);
+ sig_proc(rmp, i, FALSE /*trace*/, FALSE /* ksig */);
if (rmp->mp_flags & FS_CALL)
break;
child->mp_tracer = who_p;
child->mp_trace_flags = TO_NOEXEC;
- sig_proc(child, SIGSTOP, TRUE /*trace*/);
+ sig_proc(child, SIGSTOP, TRUE /*trace*/, FALSE /* ksig */);
mp->mp_reply.reply_trace = 0;
return(OK);
for (i = 1; i < _NSIG; i++) {
if (sigismember(&child->mp_sigtrace, i)) {
sigdelset(&child->mp_sigtrace, i);
- check_sig(child->mp_pid, i);
+ check_sig(child->mp_pid, i, FALSE /* ksig */);
}
}
if (m_in.data > 0) { /* issue signal */
- sig_proc(child, (int) m_in.data, TRUE /*trace*/);
+ sig_proc(child, (int) m_in.data, TRUE /*trace*/,
+ FALSE /* ksig */);
}
/* Resume the child as if nothing ever happened. */
if (m_in.data < 0 || m_in.data >= _NSIG) return(EINVAL);
if (m_in.data > 0) { /* issue signal */
- sig_proc(child, (int) m_in.data, FALSE /*trace*/);
+ sig_proc(child, (int) m_in.data, FALSE /*trace*/,
+ FALSE /* ksig */);
}
/* If there are any other signals waiting to be delivered,
int n;
subtest = 7;
- Signal(SIGUSR1, func11);
- Signal(SIGUSR1, SIG_IGN);
+ Signal(11, func11);
+ Signal(11, SIG_IGN);
n = getpid();
- if (kill(n, SIGUSR1) != 0) e(1);
- Signal(SIGUSR1, SIG_DFL);
+ if (kill(n, 11) != 0) e(1);
+ Signal(11, SIG_DFL);
}
void funcalrm(s)