log_parse_environment();
log_open();
+ umask(0022);
+
if (detect_container(NULL) > 0) {
- log_debug("Automatic adding console shell.");
+ log_debug("Automatically adding console shell.");
if (add_symlink("console-shell.service", "console-shell.service") < 0)
r = EXIT_FAILURE;
if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
const char *tty;
- truncate_nl(active);
if ((tty = strrchr(active, ' ')))
tty ++;
else
/* Automatically add in a serial getty on the first
* virtualizer console */
if (access("/sys/class/tty/hvc0", F_OK) == 0) {
- log_debug("Automatic adding serial getty for hvc0.");
+ log_debug("Automatically adding serial getty for hvc0.");
if (add_symlink("serial-getty@.service", "serial-getty@hvc0.service") < 0)
r = EXIT_FAILURE;
+
+ }
+
+ if (access("/sys/class/tty/xvc0", F_OK) == 0) {
+ log_debug("Automatically adding serial getty for xvc0.");
+
+ if (add_symlink("serial-getty@.service", "serial-getty@xvc0.service") < 0)
+ r = EXIT_FAILURE;
}
finish: