#!/bin/sh set -e # echo "[nimux] Enabling getty on tty1 (graphical) and ttyS0 (serial)..." # # Ensure target directories exist # mkdir -p "${TARGET_DIR}/etc/systemd/system/getty.target.wants" # # Create or refresh symlinks for tty1 and ttyS0 getty services # ln -sf /usr/lib/systemd/system/getty@.service \ # "${TARGET_DIR}/etc/systemd/system/getty.target.wants/getty@tty1.service" # ln -sf /usr/lib/systemd/system/getty@.service \ # "${TARGET_DIR}/etc/systemd/system/getty.target.wants/getty@ttyS0.service" # # Optional: also ensure getty.target is enabled (some minimal setups need this) # mkdir -p "${TARGET_DIR}/etc/systemd/system/multi-user.target.wants" # ln -sf /usr/lib/systemd/system/getty.target \ # "${TARGET_DIR}/etc/systemd/system/multi-user.target.wants/getty.target" # echo "[nimux] Getty services linked successfully."