Skip to content

Commit

Permalink
Enable agetty service in images based on Alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
eugulixes authored and denismosolov committed Aug 31, 2019
1 parent 117b37f commit b8e5d80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bootstrap/30-fixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ if is_alpine; then

# Of course, none of the supported single board computers has any cdrom.
sed -i '/cdrom/d' "${ETC}/fstab"

# Enable the agetty service, otherwise users won't see a login prompt when
# accessing the console of their device through serial ports such as
# /dev/ttyS0.
create_symlink /etc/init.d/agetty /etc/init.d/agetty.ttyS0
chroot_exec rc-update add agetty.ttyS0 default
fi


15 changes: 15 additions & 0 deletions helpers/fs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ create_dir() {
fi
}

# Creates a symlink inside the chroot environment.
# Globals:
# None
# Arguments:
# Target
# Link name
# Returns:
# None
create_symlink() {
local target=$1
local link_name=$2

chroot_exec ln -s "${target}" "${link_name}"
}

# Creates the temporary directories used while creating an image.
# Globals:
# BUILD_DIR
Expand Down

0 comments on commit b8e5d80

Please sign in to comment.