/* If there are no other partitions then make this new one active. */
{
struct part_entry *pe2;
+ int i = 0;
- for (pe2= table + 1; pe2 < table + 1 + NR_PARTITIONS; pe2++)
+ for (pe2= table + 1; pe2 < table + 1 + NR_PARTITIONS; pe2++, i++)
if (pe2->sysind != NO_PART && (pe2->bootind & ACTIVE_FLAG))
return;
stat_start(0);
fflush(stdout);
- if (((device= open(curdev->name, mode= O_RDWR, 0666)) < 0
- && (errno != EACCES
- || (!nordonly && (device= open(curdev->name, mode= O_RDONLY)) < 0)))
- ) {
+ if ((device= open(curdev->name, mode= O_RDWR, 0666)) < 0) {
stat_start(1);
if(!probing)
printf("%s: %s", curdev->name, strerror(errno));
char partbuf[100];
-#if 0
printf("\nThis is your current partition table:\n");
m_dump(orig_table);
printf("\nThis will be your new partition table:\n");
m_dump(table);
-#endif
printf("\nThis is the point of no return. You have selected to install MINIX\n");
printf("into region %d of disk %d. If you agree with this selection, your\n", (int)(r-regions), (int) (curdev-firstdev));
if (fast) {
/* But not too fast... */
+ signal(SIGTERM, SIG_IGN);
+ kill(1, SIGTERM);
+ printf("Sending SIGTERM to all processes ...\n");
+ kill(-1, SIGTERM);
sleep(1);
-
} else {
/* Run the shutdown scripts. */
signal(SIGHUP, SIG_IGN);
set -$- mem fd0 fd1 fd0p0 fd1p0 \
c0d0 c0d0p0 c0d0p0s0 c0d1 c0d1p0 c0d1p0s0 \
c0d2 c0d2p0 c0d2p0s0 c0d3 c0d3p0 c0d3p0s0 \
- tty ttyc1 ttyc2 ttyc3 tty00 tty01 ttyp0 ttyp1 ttyp2 ttyp3 eth klog
+ tty ttyc1 ttyc2 ttyc3 tty00 tty01 ttyp0 ttyp1 ttyp2 ttyp3 eth klog random cmos
;;
0:|1:-\?)
cat >&2 <<EOF
# Make bootable.
installboot -d /dev/$root /usr/mdec/bootblock /boot/boot >/dev/null || exit
-edparams /dev/$root "rootdev=$root; ramimagedev=$root; $cache; main() { echo \"This is the MINIX 3 boot monitor.\"; echo \"MINIX will load in 5 seconds, or press ESC.\"; trap 5000 boot; menu; }; save" || exit
+edparams /dev/$root "rootdev=$root; ramimagedev=$root; $cache; main() { echo This is the MINIX 3 boot monitor.; echo MINIX will load in 5 seconds, or press ESC.; trap 5000 boot; menu; }; save" || exit
pfile="/usr/src/tools/fdbootparams"
echo "Remembering boot parameters in ${pfile}."
echo "rootdev=$root; ramimagedev=$root; $cache; save" >$pfile || exit