diff options
| -rw-r--r-- | release/sysinstall/install.c | 23 | ||||
| -rw-r--r-- | release/sysinstall/msg.c | 9 | ||||
| -rw-r--r-- | usr.sbin/sade/install.c | 23 | ||||
| -rw-r--r-- | usr.sbin/sade/msg.c | 9 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/install.c | 23 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/msg.c | 9 |
6 files changed, 57 insertions, 39 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index acf83f68f50c..8728278b33bd 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.35 1995/05/20 11:13:56 jkh Exp $ + * $Id: install.c,v 1.36 1995/05/20 13:24:33 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -263,8 +263,7 @@ copy_self(void) int i; msgNotify("Copying the boot floppy to /stand on root filesystem"); - chdir("/"); - i = vsystem("find -x . | cpio -pdmv /mnt/stand"); + i = vsystem("find -x / | cpio -pdmv /mnt/stand"); if (i) msgConfirm("Copy returned error status of %d!", i); } @@ -274,16 +273,16 @@ cpio_extract(void) { int i, j, zpid, cpid, pfd[2]; - tryagain: + tryagain: + while (CpioFD == -1) { + msgConfirm("Please Insert CPIO floppy in floppy drive 0"); + CpioFD = open("/dev/rfd0", O_RDONLY); + if (CpioFD >= 0) + break; + msgDebug("Error on open of cpio floppy: %s (%d)\n", strerror(errno), errno); + } j = fork(); if (!j) { - while (CpioFD == -1) { - msgConfirm("Please Insert CPIO floppy in floppy drive 0"); - CpioFD = open("/dev/rfd0", O_RDONLY); - if (CpioFD >= 0) - break; - msgDebug("Error on open of cpio floppy: %s (%d)\n", strerror(errno), errno); - } chroot("/mnt"); chdir("/"); msgNotify("Extracting contents of CPIO floppy..."); pipe(pfd); @@ -333,6 +332,8 @@ cpio_extract(void) i = wait(&j); if (i < 0 || j || access("/mnt/OK", R_OK) == -1) { msgConfirm("CPIO floppy did not extract properly! Please verify\n\that your media is correct and try again"); + close(CpioFD); + CpioFD = -1; goto tryagain; } unlink("/mnt/OK"); diff --git a/release/sysinstall/msg.c b/release/sysinstall/msg.c index ccfaff6b35cd..31ec20c73951 100644 --- a/release/sysinstall/msg.c +++ b/release/sysinstall/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.18 1995/05/20 10:33:10 jkh Exp $ + * $Id: msg.c,v 1.19 1995/05/20 13:24:34 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -180,6 +180,7 @@ msgConfirm(char *fmt, ...) { va_list args; char *errstr; + WINDOW *w; errstr = (char *)safe_malloc(FILENAME_MAX); va_start(args, fmt); @@ -187,11 +188,15 @@ msgConfirm(char *fmt, ...) va_end(args); use_helpline(NULL); use_helpfile(NULL); + w = dupwin(newscr); if (OnVTY) { msgDebug("User confirmation requested (type ALT-F1)\n"); msgInfo(NULL); } dialog_notify(errstr); + touchwin(w); + wrefresh(w); + delwin(w); free(errstr); } @@ -209,8 +214,8 @@ msgNotify(char *fmt, ...) use_helpline(NULL); use_helpfile(NULL); msgDebug("Notify: %s\n", errstr); - dialog_msgbox("Information Dialog", errstr, -1, -1, 0); dialog_clear(); + dialog_msgbox("Information Dialog", errstr, -1, -1, 0); free(errstr); } diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index acf83f68f50c..8728278b33bd 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.35 1995/05/20 11:13:56 jkh Exp $ + * $Id: install.c,v 1.36 1995/05/20 13:24:33 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -263,8 +263,7 @@ copy_self(void) int i; msgNotify("Copying the boot floppy to /stand on root filesystem"); - chdir("/"); - i = vsystem("find -x . | cpio -pdmv /mnt/stand"); + i = vsystem("find -x / | cpio -pdmv /mnt/stand"); if (i) msgConfirm("Copy returned error status of %d!", i); } @@ -274,16 +273,16 @@ cpio_extract(void) { int i, j, zpid, cpid, pfd[2]; - tryagain: + tryagain: + while (CpioFD == -1) { + msgConfirm("Please Insert CPIO floppy in floppy drive 0"); + CpioFD = open("/dev/rfd0", O_RDONLY); + if (CpioFD >= 0) + break; + msgDebug("Error on open of cpio floppy: %s (%d)\n", strerror(errno), errno); + } j = fork(); if (!j) { - while (CpioFD == -1) { - msgConfirm("Please Insert CPIO floppy in floppy drive 0"); - CpioFD = open("/dev/rfd0", O_RDONLY); - if (CpioFD >= 0) - break; - msgDebug("Error on open of cpio floppy: %s (%d)\n", strerror(errno), errno); - } chroot("/mnt"); chdir("/"); msgNotify("Extracting contents of CPIO floppy..."); pipe(pfd); @@ -333,6 +332,8 @@ cpio_extract(void) i = wait(&j); if (i < 0 || j || access("/mnt/OK", R_OK) == -1) { msgConfirm("CPIO floppy did not extract properly! Please verify\n\that your media is correct and try again"); + close(CpioFD); + CpioFD = -1; goto tryagain; } unlink("/mnt/OK"); diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c index ccfaff6b35cd..31ec20c73951 100644 --- a/usr.sbin/sade/msg.c +++ b/usr.sbin/sade/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.18 1995/05/20 10:33:10 jkh Exp $ + * $Id: msg.c,v 1.19 1995/05/20 13:24:34 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -180,6 +180,7 @@ msgConfirm(char *fmt, ...) { va_list args; char *errstr; + WINDOW *w; errstr = (char *)safe_malloc(FILENAME_MAX); va_start(args, fmt); @@ -187,11 +188,15 @@ msgConfirm(char *fmt, ...) va_end(args); use_helpline(NULL); use_helpfile(NULL); + w = dupwin(newscr); if (OnVTY) { msgDebug("User confirmation requested (type ALT-F1)\n"); msgInfo(NULL); } dialog_notify(errstr); + touchwin(w); + wrefresh(w); + delwin(w); free(errstr); } @@ -209,8 +214,8 @@ msgNotify(char *fmt, ...) use_helpline(NULL); use_helpfile(NULL); msgDebug("Notify: %s\n", errstr); - dialog_msgbox("Information Dialog", errstr, -1, -1, 0); dialog_clear(); + dialog_msgbox("Information Dialog", errstr, -1, -1, 0); free(errstr); } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index acf83f68f50c..8728278b33bd 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.35 1995/05/20 11:13:56 jkh Exp $ + * $Id: install.c,v 1.36 1995/05/20 13:24:33 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -263,8 +263,7 @@ copy_self(void) int i; msgNotify("Copying the boot floppy to /stand on root filesystem"); - chdir("/"); - i = vsystem("find -x . | cpio -pdmv /mnt/stand"); + i = vsystem("find -x / | cpio -pdmv /mnt/stand"); if (i) msgConfirm("Copy returned error status of %d!", i); } @@ -274,16 +273,16 @@ cpio_extract(void) { int i, j, zpid, cpid, pfd[2]; - tryagain: + tryagain: + while (CpioFD == -1) { + msgConfirm("Please Insert CPIO floppy in floppy drive 0"); + CpioFD = open("/dev/rfd0", O_RDONLY); + if (CpioFD >= 0) + break; + msgDebug("Error on open of cpio floppy: %s (%d)\n", strerror(errno), errno); + } j = fork(); if (!j) { - while (CpioFD == -1) { - msgConfirm("Please Insert CPIO floppy in floppy drive 0"); - CpioFD = open("/dev/rfd0", O_RDONLY); - if (CpioFD >= 0) - break; - msgDebug("Error on open of cpio floppy: %s (%d)\n", strerror(errno), errno); - } chroot("/mnt"); chdir("/"); msgNotify("Extracting contents of CPIO floppy..."); pipe(pfd); @@ -333,6 +332,8 @@ cpio_extract(void) i = wait(&j); if (i < 0 || j || access("/mnt/OK", R_OK) == -1) { msgConfirm("CPIO floppy did not extract properly! Please verify\n\that your media is correct and try again"); + close(CpioFD); + CpioFD = -1; goto tryagain; } unlink("/mnt/OK"); diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index ccfaff6b35cd..31ec20c73951 100644 --- a/usr.sbin/sysinstall/msg.c +++ b/usr.sbin/sysinstall/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.18 1995/05/20 10:33:10 jkh Exp $ + * $Id: msg.c,v 1.19 1995/05/20 13:24:34 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -180,6 +180,7 @@ msgConfirm(char *fmt, ...) { va_list args; char *errstr; + WINDOW *w; errstr = (char *)safe_malloc(FILENAME_MAX); va_start(args, fmt); @@ -187,11 +188,15 @@ msgConfirm(char *fmt, ...) va_end(args); use_helpline(NULL); use_helpfile(NULL); + w = dupwin(newscr); if (OnVTY) { msgDebug("User confirmation requested (type ALT-F1)\n"); msgInfo(NULL); } dialog_notify(errstr); + touchwin(w); + wrefresh(w); + delwin(w); free(errstr); } @@ -209,8 +214,8 @@ msgNotify(char *fmt, ...) use_helpline(NULL); use_helpfile(NULL); msgDebug("Notify: %s\n", errstr); - dialog_msgbox("Information Dialog", errstr, -1, -1, 0); dialog_clear(); + dialog_msgbox("Information Dialog", errstr, -1, -1, 0); free(errstr); } |
