FreeBSD Bugzilla – Attachment 11808 Details for
Bug 23098
sysinstall(8): [patch] if installing on a serial console, enable getty on ttyd0.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.75 KB, created by
ambrisko
on 2000-11-25 21:50:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ambrisko
Created:
2000-11-25 21:50:00 UTC
Size:
1.75 KB
patch
obsolete
>Index: install.c >=================================================================== >RCS file: /cvs/freebsd/src/release/sysinstall/install.c,v >retrieving revision 1.268.2.15 >diff -c -r1.268.2.15 install.c >*** install.c 2000/10/31 21:33:23 1.268.2.15 >--- install.c 2000/11/25 21:31:10 >*************** >*** 744,749 **** >--- 744,752 ---- > int i; > FILE *fp; > int kstat = 1; >+ FILE *orig, *new; >+ char buf[1024]; >+ char *pos; > > /* All of this is done only as init, just to be safe */ > if (RunningAsInit) { >*************** >*** 780,787 **** > "boot from the hard disk, I'm afraid!"); > return DITEM_FAILURE; > } > } >! > /* BOGON #1: Resurrect /dev after bin distribution screws it up */ > dialog_clear_norefresh(); > msgNotify("Remaking all devices.. Please wait!"); >--- 783,815 ---- > "boot from the hard disk, I'm afraid!"); > return DITEM_FAILURE; > } >+ >+ /* Fixup /etc/ttys to start a getty on the serial port. >+ This way after a serial installation you can login via >+ the serial port */ >+ >+ if (!OnVTY){ >+ if (((orig=fopen("/etc/ttys","r")) != NULL) && >+ ((new=fopen("/etc/ttys.tmp","w")) != NULL)) { >+ while (fgets(buf,sizeof(buf),orig)){ >+ if (strstr(buf,"ttyd0")){ >+ if ((pos=strstr(buf,"off"))){ >+ *pos++='o'; >+ *pos++='n'; >+ *pos++=' '; >+ } >+ } >+ fputs(buf,new); >+ } >+ fclose(orig); >+ fclose(new); >+ >+ rename("/etc/ttys.tmp","/etc/ttys"); >+ unlink("/etc/ttys.tmp"); >+ } >+ } > } >! > /* BOGON #1: Resurrect /dev after bin distribution screws it up */ > dialog_clear_norefresh(); > msgNotify("Remaking all devices.. Please wait!");
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 23098
: 11808