mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-13 22:28:27 +00:00
Drop creating upstart jobs for serial getty.
This commit is contained in:
commit
55508d96f7
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,7 +1,11 @@
|
||||
livecd-rootfs (2.449) UNRELEASED; urgency=medium
|
||||
|
||||
[ Balint Reczey ]
|
||||
* Use VMDKstream in a more future-proof way
|
||||
|
||||
[ Dimitri John Ledkov ]
|
||||
* Drop creating upstart jobs for serial getty.
|
||||
|
||||
-- Balint Reczey <rbalint@ubuntu.com> Mon, 24 Jul 2017 20:39:35 +0200
|
||||
|
||||
livecd-rootfs (2.448) artful; urgency=medium
|
||||
|
@ -20,36 +20,6 @@ _xchroot() {
|
||||
#### COMMON architecture independent functions
|
||||
arch=$(_xchroot "${rootd}" dpkg --print-architecture)
|
||||
|
||||
add_serial_console() {
|
||||
condev=$1
|
||||
idir="$rootd/etc/init"
|
||||
cat << EOF > "${idir}/${condev}.conf"
|
||||
# CONDEV - getty
|
||||
#
|
||||
# This service maintains a getty on CONDEV from the point the system is
|
||||
# started until it is shut down again.
|
||||
|
||||
start on stopped rc RUNLEVEL=[2345] and (
|
||||
not-container or
|
||||
container CONTAINER=lxc or
|
||||
container CONTAINER=lxc-libvirt)
|
||||
|
||||
stop on runlevel [!2345]
|
||||
|
||||
pre-start script
|
||||
# getty will not be started if the serial console is not present
|
||||
stty -F /dev/CONDEV -a 2> /dev/null > /dev/null || { stop ; exit 0; }
|
||||
end script
|
||||
|
||||
respawn
|
||||
script
|
||||
exec /sbin/getty -L CONDEV 115200 vt102
|
||||
end script
|
||||
${CLOUD_IMG_STR}
|
||||
EOF
|
||||
sed -i "s/CONDEV/${condev}/g" "$idir/${condev}.conf"
|
||||
}
|
||||
|
||||
fake_cloud_init() {
|
||||
# If the cloud does not provide a meta-data service this should be run
|
||||
# This will setup a nocloud datasource.
|
||||
@ -157,8 +127,6 @@ fi
|
||||
case $arch in
|
||||
# ARM images are special
|
||||
armhf|arm64)
|
||||
echo "Configuring ARM Serial Port"
|
||||
add_serial_console ttyAMA0
|
||||
# Dirty hack because SUBARCH doesn't exist when running chroot hooks,
|
||||
# and we don't want raspi2 images to depend on a cloud data source:
|
||||
if _xchroot "${rootd}" dpkg -l linux-image-raspi2 2>/dev/null | grep -q '^.i'; then
|
||||
@ -169,15 +137,7 @@ case $arch in
|
||||
|
||||
exit 0
|
||||
;;
|
||||
## Add ttyS0 for i386/amd64 for Trusty and newer
|
||||
i386|amd64)
|
||||
add_serial_console ttyS0
|
||||
;;
|
||||
powerpc|ppc64el)
|
||||
add_serial_console hvc0
|
||||
exit 0
|
||||
;;
|
||||
s390x)
|
||||
powerpc|ppc64el|s390x)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user