You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
506 B

  1. #!/bin/bash -e
  2. install -d "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d"
  3. install -m 644 files/noclear.conf "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/noclear.conf"
  4. install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab"
  5. on_chroot << EOF
  6. if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
  7. adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
  8. fi
  9. if [ -n "${FIRST_USER_PASS}" ]; then
  10. echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd
  11. fi
  12. echo "root:root" | chpasswd
  13. EOF