mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 13:15:05 +00:00
Allow the Fix-it functionality to detect that we are on a serial console,
and DTRT rather than start the fixit shell on a non-existant vty. PR: 19837 Submitted by: Doug Ambrisko <ambrisko@whistle.com> Approved by: JKH
This commit is contained in:
parent
6a5be8627c
commit
7090abf525
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63404
|
@ -56,6 +56,7 @@
|
||||||
* Used by package.c
|
* Used by package.c
|
||||||
*/
|
*/
|
||||||
int _interactiveHack;
|
int _interactiveHack;
|
||||||
|
int FixItMode = 0;
|
||||||
|
|
||||||
static void create_termcap(void);
|
static void create_termcap(void);
|
||||||
static void fixit_common(void);
|
static void fixit_common(void);
|
||||||
|
@ -248,8 +249,10 @@ installInitial(void)
|
||||||
int
|
int
|
||||||
installFixitHoloShell(dialogMenuItem *self)
|
installFixitHoloShell(dialogMenuItem *self)
|
||||||
{
|
{
|
||||||
|
FixItMode = 1;
|
||||||
systemCreateHoloshell();
|
systemCreateHoloshell();
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
|
FixItMode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -397,6 +400,8 @@ fixit_common(void)
|
||||||
msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
|
msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
|
||||||
if (!file_readable(TERMCAP_FILE))
|
if (!file_readable(TERMCAP_FILE))
|
||||||
create_termcap();
|
create_termcap();
|
||||||
|
if (!OnVTY)
|
||||||
|
systemSuspendDialog(); /* must be before the fork() */
|
||||||
if (!(child = fork())) {
|
if (!(child = fork())) {
|
||||||
int i, fd, fdstop;
|
int i, fd, fdstop;
|
||||||
struct termios foo;
|
struct termios foo;
|
||||||
|
|
|
@ -402,6 +402,7 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
|
||||||
extern DMenu MenuUsermgmt; /* User management menu */
|
extern DMenu MenuUsermgmt; /* User management menu */
|
||||||
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
||||||
extern DMenu MenuXF86Config; /* Select XFree86 configuration type */
|
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 */
|
/* Stuff from libdialog which isn't properly declared outside */
|
||||||
extern void display_helpfile(void);
|
extern void display_helpfile(void);
|
||||||
|
@ -711,6 +712,8 @@ extern void systemInitialize(int argc, char **argv);
|
||||||
extern void systemShutdown(int status);
|
extern void systemShutdown(int status);
|
||||||
extern int execExecute(char *cmd, char *name);
|
extern int execExecute(char *cmd, char *name);
|
||||||
extern int systemExecute(char *cmd);
|
extern int systemExecute(char *cmd);
|
||||||
|
extern void systemSuspendDialog(void);
|
||||||
|
extern void systemResumeDialog(void);
|
||||||
extern int systemDisplayHelp(char *file);
|
extern int systemDisplayHelp(char *file);
|
||||||
extern char *systemHelpFile(char *file, char *buf);
|
extern char *systemHelpFile(char *file, char *buf);
|
||||||
extern void systemChangeFont(const u_char font[]);
|
extern void systemChangeFont(const u_char font[]);
|
||||||
|
|
|
@ -217,6 +217,28 @@ systemExecute(char *command)
|
||||||
return status;
|
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 */
|
/* Display a help file in a filebox */
|
||||||
int
|
int
|
||||||
systemDisplayHelp(char *file)
|
systemDisplayHelp(char *file)
|
||||||
|
@ -355,7 +377,9 @@ vsystem(char *fmt, ...)
|
||||||
void
|
void
|
||||||
systemCreateHoloshell(void)
|
systemCreateHoloshell(void)
|
||||||
{
|
{
|
||||||
if (OnVTY && RunningAsInit) {
|
int waitstatus;
|
||||||
|
|
||||||
|
if ((FixItMode || OnVTY) && RunningAsInit) {
|
||||||
|
|
||||||
if (ehs_pid != 0) {
|
if (ehs_pid != 0) {
|
||||||
int pstat;
|
int pstat;
|
||||||
|
@ -377,6 +401,8 @@ systemCreateHoloshell(void)
|
||||||
(void) waitpid(ehs_pid, &pstat, WNOHANG);
|
(void) waitpid(ehs_pid, &pstat, WNOHANG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!OnVTY)
|
||||||
|
systemSuspendDialog(); /* must be before the fork() */
|
||||||
if ((ehs_pid = fork()) == 0) {
|
if ((ehs_pid = fork()) == 0) {
|
||||||
int i, fd;
|
int i, fd;
|
||||||
struct termios foo;
|
struct termios foo;
|
||||||
|
@ -385,7 +411,10 @@ systemCreateHoloshell(void)
|
||||||
ioctl(0, TIOCNOTTY, NULL);
|
ioctl(0, TIOCNOTTY, NULL);
|
||||||
for (i = getdtablesize(); i >= 0; --i)
|
for (i = getdtablesize(); i >= 0; --i)
|
||||||
close(i);
|
close(i);
|
||||||
fd = open("/dev/ttyv3", O_RDWR);
|
if (OnVTY)
|
||||||
|
fd = open("/dev/ttyv3", O_RDWR);
|
||||||
|
else
|
||||||
|
fd = open("/dev/console", O_RDWR);
|
||||||
ioctl(0, TIOCSCTTY, &fd);
|
ioctl(0, TIOCSCTTY, &fd);
|
||||||
dup2(0, 1);
|
dup2(0, 1);
|
||||||
dup2(0, 2);
|
dup2(0, 2);
|
||||||
|
@ -400,16 +429,26 @@ systemCreateHoloshell(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msgDebug("Doctor: I'm unable to get the terminal attributes!\n");
|
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);
|
execlp("sh", "-sh", 0);
|
||||||
msgDebug("Was unable to execute sh for Holographic shell!\n");
|
msgDebug("Was unable to execute sh for Holographic shell!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WINDOW *w = savescr();
|
if (OnVTY) {
|
||||||
|
WINDOW *w = savescr();
|
||||||
|
|
||||||
msgNotify("Starting an emergency holographic shell on VTY4");
|
msgNotify("Starting an emergency holographic shell on VTY4");
|
||||||
sleep(2);
|
sleep(2);
|
||||||
restorescr(w);
|
restorescr(w);
|
||||||
|
}
|
||||||
|
if (!OnVTY){
|
||||||
|
(void)waitpid(ehs_pid, &waitstatus, 0);
|
||||||
|
systemResumeDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
* Used by package.c
|
* Used by package.c
|
||||||
*/
|
*/
|
||||||
int _interactiveHack;
|
int _interactiveHack;
|
||||||
|
int FixItMode = 0;
|
||||||
|
|
||||||
static void create_termcap(void);
|
static void create_termcap(void);
|
||||||
static void fixit_common(void);
|
static void fixit_common(void);
|
||||||
|
@ -248,8 +249,10 @@ installInitial(void)
|
||||||
int
|
int
|
||||||
installFixitHoloShell(dialogMenuItem *self)
|
installFixitHoloShell(dialogMenuItem *self)
|
||||||
{
|
{
|
||||||
|
FixItMode = 1;
|
||||||
systemCreateHoloshell();
|
systemCreateHoloshell();
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
|
FixItMode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -397,6 +400,8 @@ fixit_common(void)
|
||||||
msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
|
msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
|
||||||
if (!file_readable(TERMCAP_FILE))
|
if (!file_readable(TERMCAP_FILE))
|
||||||
create_termcap();
|
create_termcap();
|
||||||
|
if (!OnVTY)
|
||||||
|
systemSuspendDialog(); /* must be before the fork() */
|
||||||
if (!(child = fork())) {
|
if (!(child = fork())) {
|
||||||
int i, fd, fdstop;
|
int i, fd, fdstop;
|
||||||
struct termios foo;
|
struct termios foo;
|
||||||
|
|
|
@ -402,6 +402,7 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
|
||||||
extern DMenu MenuUsermgmt; /* User management menu */
|
extern DMenu MenuUsermgmt; /* User management menu */
|
||||||
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
||||||
extern DMenu MenuXF86Config; /* Select XFree86 configuration type */
|
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 */
|
/* Stuff from libdialog which isn't properly declared outside */
|
||||||
extern void display_helpfile(void);
|
extern void display_helpfile(void);
|
||||||
|
@ -711,6 +712,8 @@ extern void systemInitialize(int argc, char **argv);
|
||||||
extern void systemShutdown(int status);
|
extern void systemShutdown(int status);
|
||||||
extern int execExecute(char *cmd, char *name);
|
extern int execExecute(char *cmd, char *name);
|
||||||
extern int systemExecute(char *cmd);
|
extern int systemExecute(char *cmd);
|
||||||
|
extern void systemSuspendDialog(void);
|
||||||
|
extern void systemResumeDialog(void);
|
||||||
extern int systemDisplayHelp(char *file);
|
extern int systemDisplayHelp(char *file);
|
||||||
extern char *systemHelpFile(char *file, char *buf);
|
extern char *systemHelpFile(char *file, char *buf);
|
||||||
extern void systemChangeFont(const u_char font[]);
|
extern void systemChangeFont(const u_char font[]);
|
||||||
|
|
|
@ -217,6 +217,28 @@ systemExecute(char *command)
|
||||||
return status;
|
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 */
|
/* Display a help file in a filebox */
|
||||||
int
|
int
|
||||||
systemDisplayHelp(char *file)
|
systemDisplayHelp(char *file)
|
||||||
|
@ -355,7 +377,9 @@ vsystem(char *fmt, ...)
|
||||||
void
|
void
|
||||||
systemCreateHoloshell(void)
|
systemCreateHoloshell(void)
|
||||||
{
|
{
|
||||||
if (OnVTY && RunningAsInit) {
|
int waitstatus;
|
||||||
|
|
||||||
|
if ((FixItMode || OnVTY) && RunningAsInit) {
|
||||||
|
|
||||||
if (ehs_pid != 0) {
|
if (ehs_pid != 0) {
|
||||||
int pstat;
|
int pstat;
|
||||||
|
@ -377,6 +401,8 @@ systemCreateHoloshell(void)
|
||||||
(void) waitpid(ehs_pid, &pstat, WNOHANG);
|
(void) waitpid(ehs_pid, &pstat, WNOHANG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!OnVTY)
|
||||||
|
systemSuspendDialog(); /* must be before the fork() */
|
||||||
if ((ehs_pid = fork()) == 0) {
|
if ((ehs_pid = fork()) == 0) {
|
||||||
int i, fd;
|
int i, fd;
|
||||||
struct termios foo;
|
struct termios foo;
|
||||||
|
@ -385,7 +411,10 @@ systemCreateHoloshell(void)
|
||||||
ioctl(0, TIOCNOTTY, NULL);
|
ioctl(0, TIOCNOTTY, NULL);
|
||||||
for (i = getdtablesize(); i >= 0; --i)
|
for (i = getdtablesize(); i >= 0; --i)
|
||||||
close(i);
|
close(i);
|
||||||
fd = open("/dev/ttyv3", O_RDWR);
|
if (OnVTY)
|
||||||
|
fd = open("/dev/ttyv3", O_RDWR);
|
||||||
|
else
|
||||||
|
fd = open("/dev/console", O_RDWR);
|
||||||
ioctl(0, TIOCSCTTY, &fd);
|
ioctl(0, TIOCSCTTY, &fd);
|
||||||
dup2(0, 1);
|
dup2(0, 1);
|
||||||
dup2(0, 2);
|
dup2(0, 2);
|
||||||
|
@ -400,16 +429,26 @@ systemCreateHoloshell(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msgDebug("Doctor: I'm unable to get the terminal attributes!\n");
|
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);
|
execlp("sh", "-sh", 0);
|
||||||
msgDebug("Was unable to execute sh for Holographic shell!\n");
|
msgDebug("Was unable to execute sh for Holographic shell!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WINDOW *w = savescr();
|
if (OnVTY) {
|
||||||
|
WINDOW *w = savescr();
|
||||||
|
|
||||||
msgNotify("Starting an emergency holographic shell on VTY4");
|
msgNotify("Starting an emergency holographic shell on VTY4");
|
||||||
sleep(2);
|
sleep(2);
|
||||||
restorescr(w);
|
restorescr(w);
|
||||||
|
}
|
||||||
|
if (!OnVTY){
|
||||||
|
(void)waitpid(ehs_pid, &waitstatus, 0);
|
||||||
|
systemResumeDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
* Used by package.c
|
* Used by package.c
|
||||||
*/
|
*/
|
||||||
int _interactiveHack;
|
int _interactiveHack;
|
||||||
|
int FixItMode = 0;
|
||||||
|
|
||||||
static void create_termcap(void);
|
static void create_termcap(void);
|
||||||
static void fixit_common(void);
|
static void fixit_common(void);
|
||||||
|
@ -248,8 +249,10 @@ installInitial(void)
|
||||||
int
|
int
|
||||||
installFixitHoloShell(dialogMenuItem *self)
|
installFixitHoloShell(dialogMenuItem *self)
|
||||||
{
|
{
|
||||||
|
FixItMode = 1;
|
||||||
systemCreateHoloshell();
|
systemCreateHoloshell();
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
|
FixItMode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -397,6 +400,8 @@ fixit_common(void)
|
||||||
msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
|
msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
|
||||||
if (!file_readable(TERMCAP_FILE))
|
if (!file_readable(TERMCAP_FILE))
|
||||||
create_termcap();
|
create_termcap();
|
||||||
|
if (!OnVTY)
|
||||||
|
systemSuspendDialog(); /* must be before the fork() */
|
||||||
if (!(child = fork())) {
|
if (!(child = fork())) {
|
||||||
int i, fd, fdstop;
|
int i, fd, fdstop;
|
||||||
struct termios foo;
|
struct termios foo;
|
||||||
|
|
|
@ -402,6 +402,7 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
|
||||||
extern DMenu MenuUsermgmt; /* User management menu */
|
extern DMenu MenuUsermgmt; /* User management menu */
|
||||||
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
||||||
extern DMenu MenuXF86Config; /* Select XFree86 configuration type */
|
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 */
|
/* Stuff from libdialog which isn't properly declared outside */
|
||||||
extern void display_helpfile(void);
|
extern void display_helpfile(void);
|
||||||
|
@ -711,6 +712,8 @@ extern void systemInitialize(int argc, char **argv);
|
||||||
extern void systemShutdown(int status);
|
extern void systemShutdown(int status);
|
||||||
extern int execExecute(char *cmd, char *name);
|
extern int execExecute(char *cmd, char *name);
|
||||||
extern int systemExecute(char *cmd);
|
extern int systemExecute(char *cmd);
|
||||||
|
extern void systemSuspendDialog(void);
|
||||||
|
extern void systemResumeDialog(void);
|
||||||
extern int systemDisplayHelp(char *file);
|
extern int systemDisplayHelp(char *file);
|
||||||
extern char *systemHelpFile(char *file, char *buf);
|
extern char *systemHelpFile(char *file, char *buf);
|
||||||
extern void systemChangeFont(const u_char font[]);
|
extern void systemChangeFont(const u_char font[]);
|
||||||
|
|
|
@ -217,6 +217,28 @@ systemExecute(char *command)
|
||||||
return status;
|
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 */
|
/* Display a help file in a filebox */
|
||||||
int
|
int
|
||||||
systemDisplayHelp(char *file)
|
systemDisplayHelp(char *file)
|
||||||
|
@ -355,7 +377,9 @@ vsystem(char *fmt, ...)
|
||||||
void
|
void
|
||||||
systemCreateHoloshell(void)
|
systemCreateHoloshell(void)
|
||||||
{
|
{
|
||||||
if (OnVTY && RunningAsInit) {
|
int waitstatus;
|
||||||
|
|
||||||
|
if ((FixItMode || OnVTY) && RunningAsInit) {
|
||||||
|
|
||||||
if (ehs_pid != 0) {
|
if (ehs_pid != 0) {
|
||||||
int pstat;
|
int pstat;
|
||||||
|
@ -377,6 +401,8 @@ systemCreateHoloshell(void)
|
||||||
(void) waitpid(ehs_pid, &pstat, WNOHANG);
|
(void) waitpid(ehs_pid, &pstat, WNOHANG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!OnVTY)
|
||||||
|
systemSuspendDialog(); /* must be before the fork() */
|
||||||
if ((ehs_pid = fork()) == 0) {
|
if ((ehs_pid = fork()) == 0) {
|
||||||
int i, fd;
|
int i, fd;
|
||||||
struct termios foo;
|
struct termios foo;
|
||||||
|
@ -385,7 +411,10 @@ systemCreateHoloshell(void)
|
||||||
ioctl(0, TIOCNOTTY, NULL);
|
ioctl(0, TIOCNOTTY, NULL);
|
||||||
for (i = getdtablesize(); i >= 0; --i)
|
for (i = getdtablesize(); i >= 0; --i)
|
||||||
close(i);
|
close(i);
|
||||||
fd = open("/dev/ttyv3", O_RDWR);
|
if (OnVTY)
|
||||||
|
fd = open("/dev/ttyv3", O_RDWR);
|
||||||
|
else
|
||||||
|
fd = open("/dev/console", O_RDWR);
|
||||||
ioctl(0, TIOCSCTTY, &fd);
|
ioctl(0, TIOCSCTTY, &fd);
|
||||||
dup2(0, 1);
|
dup2(0, 1);
|
||||||
dup2(0, 2);
|
dup2(0, 2);
|
||||||
|
@ -400,16 +429,26 @@ systemCreateHoloshell(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msgDebug("Doctor: I'm unable to get the terminal attributes!\n");
|
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);
|
execlp("sh", "-sh", 0);
|
||||||
msgDebug("Was unable to execute sh for Holographic shell!\n");
|
msgDebug("Was unable to execute sh for Holographic shell!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WINDOW *w = savescr();
|
if (OnVTY) {
|
||||||
|
WINDOW *w = savescr();
|
||||||
|
|
||||||
msgNotify("Starting an emergency holographic shell on VTY4");
|
msgNotify("Starting an emergency holographic shell on VTY4");
|
||||||
sleep(2);
|
sleep(2);
|
||||||
restorescr(w);
|
restorescr(w);
|
||||||
|
}
|
||||||
|
if (!OnVTY){
|
||||||
|
(void)waitpid(ehs_pid, &waitstatus, 0);
|
||||||
|
systemResumeDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue