FreeBSD Bugzilla – Attachment 9750 Details for
Bug 19837
sysinstall(8): [patch] run Fix It floppy from serial port
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 5.07 KB, created by
ambrisko
on 2000-07-10 22:50:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ambrisko
Created:
2000-07-10 22:50:00 UTC
Size:
5.07 KB
patch
obsolete
>Index: install.c >=================================================================== >RCS file: /cvs/freebsd/src/release/sysinstall/install.c,v >retrieving revision 1.274 >diff -c -r1.274 install.c >*** install.c 2000/05/31 00:57:48 1.274 >--- install.c 2000/07/10 21:25:20 >*************** >*** 56,61 **** >--- 56,62 ---- > * Used by package.c > */ > int _interactiveHack; >+ int FixItMode = 0; > > static void create_termcap(void); > static void fixit_common(void); >*************** >*** 248,255 **** >--- 249,258 ---- > int > installFixitHoloShell(dialogMenuItem *self) > { >+ FixItMode = 1; > systemCreateHoloshell(); > return DITEM_SUCCESS; >+ FixItMode = 0; > } > > int >*************** >*** 397,402 **** >--- 400,407 ---- > msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this.."); > if (!file_readable(TERMCAP_FILE)) > create_termcap(); >+ if (!OnVTY) >+ systemSuspendDialog(); /* must be before the fork() */ > if (!(child = fork())) { > int i, fd, fdstop; > struct termios foo; >Index: sysinstall.h >=================================================================== >RCS file: /cvs/freebsd/src/release/sysinstall/sysinstall.h,v >retrieving revision 1.190 >diff -c -r1.190 sysinstall.h >*** sysinstall.h 2000/06/05 13:17:23 1.190 >--- sysinstall.h 2000/07/10 21:25:20 >*************** >*** 398,403 **** >--- 398,404 ---- > extern DMenu MenuUsermgmt; /* User management menu */ > extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ > extern DMenu MenuXF86Config; /* Select XFree86 configuration type */ >+ extern int FixItMode; /* FixItMode starts shell onc urrent device (ie Serial port) */ > > /* Stuff from libdialog which isn't properly declared outside */ > extern void display_helpfile(void); >*************** >*** 707,712 **** >--- 708,715 ---- > extern void systemShutdown(int status); > extern int execExecute(char *cmd, char *name); > extern int systemExecute(char *cmd); >+ extern void systemSuspendDialog(void); >+ extern void systemResumeDialog(void); > extern int systemDisplayHelp(char *file); > extern char *systemHelpFile(char *file, char *buf); > extern void systemChangeFont(const u_char font[]); >Index: system.c >=================================================================== >RCS file: /cvs/freebsd/src/release/sysinstall/system.c,v >retrieving revision 1.104 >diff -c -r1.104 system.c >*** system.c 2000/03/25 04:23:08 1.104 >--- system.c 2000/07/10 21:25:20 >*************** >*** 217,222 **** >--- 217,244 ---- > return status; > } > >+ /* suspend/resume libdialog/curses screen */ >+ static WINDOW *oldW; >+ >+ void >+ systemSuspendDialog(void) >+ { >+ >+ oldW = savescr(); >+ dialog_clear(); >+ dialog_update(); >+ end_dialog(); >+ DialogActive = FALSE; >+ } >+ >+ void >+ systemResumeDialog(void) >+ { >+ >+ DialogActive = TRUE; >+ restorescr(oldW); >+ } >+ > /* Display a help file in a filebox */ > int > systemDisplayHelp(char *file) >*************** >*** 355,361 **** > void > systemCreateHoloshell(void) > { >! if (OnVTY && RunningAsInit) { > > if (ehs_pid != 0) { > int pstat; >--- 377,385 ---- > void > systemCreateHoloshell(void) > { >! int waitstatus; >! >! if ((FixItMode || OnVTY) && RunningAsInit) { > > if (ehs_pid != 0) { > int pstat; >*************** >*** 377,382 **** >--- 401,408 ---- > (void) waitpid(ehs_pid, &pstat, WNOHANG); > } > >+ if (!OnVTY) >+ systemSuspendDialog(); /* must be before the fork() */ > if ((ehs_pid = fork()) == 0) { > int i, fd; > struct termios foo; >*************** >*** 385,391 **** > ioctl(0, TIOCNOTTY, NULL); > for (i = getdtablesize(); i >= 0; --i) > close(i); >! fd = open("/dev/ttyv3", O_RDWR); > ioctl(0, TIOCSCTTY, &fd); > dup2(0, 1); > dup2(0, 2); >--- 411,420 ---- > ioctl(0, TIOCNOTTY, NULL); > for (i = getdtablesize(); i >= 0; --i) > close(i); >! if (OnVTY) >! fd = open("/dev/ttyv3", O_RDWR); >! else >! fd = open("/dev/console", O_RDWR); > ioctl(0, TIOCSCTTY, &fd); > dup2(0, 1); > dup2(0, 2); >*************** >*** 400,415 **** > } > else > msgDebug("Doctor: I'm unable to get the terminal attributes!\n"); > execlp("sh", "-sh", 0); > msgDebug("Was unable to execute sh for Holographic shell!\n"); > exit(1); > } > else { >! WINDOW *w = savescr(); > >! msgNotify("Starting an emergency holographic shell on VTY4"); >! sleep(2); >! restorescr(w); > } > } > } >--- 429,454 ---- > } > else > msgDebug("Doctor: I'm unable to get the terminal attributes!\n"); >+ if (!OnVTY){ >+ printf("Type ``exit'' in this fixit shell to resume sysinstall.\n\n"); >+ fflush(stdout); >+ } > execlp("sh", "-sh", 0); > msgDebug("Was unable to execute sh for Holographic shell!\n"); > exit(1); > } > else { >! if (OnVTY) { >! WINDOW *w = savescr(); > >! msgNotify("Starting an emergency holographic shell on VTY4"); >! sleep(2); >! restorescr(w); >! } >! if (!OnVTY){ >! (void)waitpid(ehs_pid, &waitstatus, 0); >! systemResumeDialog(); >! } > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19837
: 9750