summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-11-05 16:59:19 +0000
committerNeil Williams <codehelp@debian.org>2015-11-05 16:59:19 +0000
commit712731075f2d514f4c51261be8e3afaa278d90be (patch)
tree9681809f0029c1f7bd161c0b20d478a75436cf34
parent261af90a7aad0a72c776235b462fa8d1bf312679 (diff)
downloadvmdebootstrap-712731075f2d514f4c51261be8e3afaa278d90be.tar.gz
Only implement serial-console on Wheezy.
-rwxr-xr-xbin/vmdebootstrap7
-rw-r--r--doc/overview.rst10
-rw-r--r--man/vmdebootstrap.rst11
3 files changed, 17 insertions, 11 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap
index 35287ce..0176e0d 100755
--- a/bin/vmdebootstrap
+++ b/bin/vmdebootstrap
@@ -256,6 +256,7 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
extlinux = self.handlers[ExtLinux.name]
base = self.handlers[Base.name]
uefi = self.handlers[Uefi.name]
+ distro = self.handlers[Codenames.name]
if self.settings['use-uefi']:
bootdir = self.bootdir
logging.debug(
@@ -274,7 +275,11 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
extlinux.install_extlinux(rootdev, rootdir)
elif self.settings['extlinux']:
extlinux.install_extlinux(rootdev, rootdir)
- base.append_serial_console(rootdir)
+ # only append for wheezy (which became oldstable on 2015.04.25)
+ if distro.was_oldstable(datetime.date(2015, 4, 26)):
+ base.append_serial_console(rootdir)
+ else:
+ base.message("Skipping setting serial console- wheezy only.")
self.optimize_image(rootdir)
def start_ops(self):
diff --git a/doc/overview.rst b/doc/overview.rst
index 6ed05fa..69c81ca 100644
--- a/doc/overview.rst
+++ b/doc/overview.rst
@@ -79,12 +79,12 @@ Options
be of the format: USER/PASSSWORD.
--owner=OWNER change the owner of the final image from root to
the specified user.
- --serial-console configure image to use a serial console
+ --serial-console configure image to use a serial console (Wheezy only)
--serial-console-command
- set the command to manage the serial console which
- will be appended to :file:`/etc/inittab`. Default
- is ``/sbin/getty \-L ttyS0 115200 vt100``, resulting
- in a line::
+ (Wheezy only.) Set the command to manage the serial
+ console which will be appended to :file:`/etc/inittab`.
+ Default is ``/sbin/getty \-L ttyS0 115200 vt100``,
+ resulting in a line::
"S0:23:respawn:/sbin/getty \-L ttyS0 115200 vt100"
diff --git a/man/vmdebootstrap.rst b/man/vmdebootstrap.rst
index 90fad4c..0869afe 100644
--- a/man/vmdebootstrap.rst
+++ b/man/vmdebootstrap.rst
@@ -71,12 +71,13 @@ Options
be of the format: USER/PASSSWORD.
--owner=OWNER change the owner of the final image from root to
the specified user.
- --serial-console configure image to use a serial console
+ --serial-console configure image to use a serial console (only
+ needed and only used) on Wheezy.
--serial-console-command
- set the command to manage the serial console which
- will be appended to :file:`/etc/inittab`. Default
- is ``/sbin/getty \-L ttyS0 115200 vt100``, resulting
- in a line::
+ (Wheezy only.) Set the command to manage the serial
+ console which will be appended to :file:`/etc/inittab`.
+ Default is ``/sbin/getty \-L ttyS0 115200 vt100``,
+ resulting in a line::
"S0:23:respawn:/sbin/getty \-L ttyS0 115200 vt100"