mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-05 05:22:08 +00:00
Incorporate autocons
This should permit skipping it on kernel command line.
This commit is contained in:
parent
e2aaa2afb4
commit
76f7c12ca5
@ -25,6 +25,7 @@ int main(int argc, char* argv[]) {
|
||||
int currspeed;
|
||||
speed_t cspeed;
|
||||
char buff[128];
|
||||
char* offset;
|
||||
uint64_t address;
|
||||
spcr = open("/sys/firmware/acpi/tables/SPCR", O_RDONLY);
|
||||
if (spcr < 0) {
|
||||
@ -38,6 +39,7 @@ int main(int argc, char* argv[]) {
|
||||
if (buff[40] != 1) exit(0); //IO only
|
||||
address = *(uint64_t *)(buff + 44);
|
||||
currspeed = buff[58];
|
||||
offset = buff + 10;
|
||||
if (address == COM1) {
|
||||
strncpy(buff, "/dev/ttyS0", 128);
|
||||
} else if (address == COM2) {
|
||||
@ -51,14 +53,16 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
if (currspeed == SPEED9600) {
|
||||
cspeed = B9600;
|
||||
strcpy(offset, ",9600");
|
||||
} else if (currspeed == SPEED19200) {
|
||||
cspeed = B19200;
|
||||
strcpy(offset, ",19200");
|
||||
} else if (currspeed == SPEED57600) {
|
||||
cspeed = B57600;
|
||||
strcpy(offset, ",57600");
|
||||
} else if (currspeed == SPEED115200) {
|
||||
cspeed = B115200;
|
||||
} else if (currspeed == SPEED115200) {
|
||||
cspeed = 0;
|
||||
strcpy(offset, ",115200");
|
||||
} else {
|
||||
exit(0);
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
echo -n "" >> /tmp/net.ifaces
|
||||
cat /tls/*.pem >> /etc/pki/tls/certs/ca-bundle.crt
|
||||
autocons=$(/opt/confluent/bin/autocons)
|
||||
if [ -n "$autocons" ]; then
|
||||
echo console=$autocons >> /etc/cmdline.d/01-autocons
|
||||
fi
|
||||
. /lib/anaconda-lib.sh
|
||||
wait_for_kickstart
|
||||
|
Loading…
x
Reference in New Issue
Block a user