From acbaa05eb787d934c263b9931c2bc17025bd392b Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 30 Aug 2016 12:16:42 +1200 Subject: [PATCH] Add a shell wrapper for console-conf This is Steve's idea for reducing the RAM used at rest. --- bin/console-conf-wrapper | 6 ++++++ debian/console-conf.console-conf@.service | 2 +- debian/console-conf.install | 1 + debian/console-conf.links | 1 + debian/console-conf.serial-console-conf@.service | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 bin/console-conf-wrapper diff --git a/bin/console-conf-wrapper b/bin/console-conf-wrapper new file mode 100755 index 00000000..b29667d1 --- /dev/null +++ b/bin/console-conf-wrapper @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +echo -n 'Press enter to configure: ' +read REPLY +exec console-conf "$@" diff --git a/debian/console-conf.console-conf@.service b/debian/console-conf.console-conf@.service index d4574085..45a05917 100644 --- a/debian/console-conf.console-conf@.service +++ b/debian/console-conf.console-conf@.service @@ -11,7 +11,7 @@ ConditionPathExists=!/var/lib/console-conf/complete [Service] Environment=PYTHONPATH=/usr/share/subiquity ExecStartPre=/bin/systemctl stop getty@%I -ExecStart=-/sbin/agetty -n --noclear -l /usr/bin/console-conf %I $TERM +ExecStart=-/sbin/agetty -n --noclear -l /usr/bin/console-conf-wrapper %I $TERM ExecStop=/bin/systemctl start getty@%I #ExecStopPost=/bin/echo "Post stop, starting getty@%I" #ExecStopPost=/bin/systemctl start getty@%I diff --git a/debian/console-conf.install b/debian/console-conf.install index 2a8e0908..f7627695 100644 --- a/debian/console-conf.install +++ b/debian/console-conf.install @@ -1,2 +1,3 @@ bin/console-conf-tui usr/share/subiquity +bin/console-conf-wrapper usr/share/subiquity usr/share/subiquity/console_conf diff --git a/debian/console-conf.links b/debian/console-conf.links index e63bfb82..cf6df64b 100644 --- a/debian/console-conf.links +++ b/debian/console-conf.links @@ -1 +1,2 @@ /usr/share/subiquity/console-conf-tui /usr/bin/console-conf +/usr/share/subiquity/console-conf-wrapper /usr/bin/console-conf-wrapper diff --git a/debian/console-conf.serial-console-conf@.service b/debian/console-conf.serial-console-conf@.service index f287e336..3cb0104e 100644 --- a/debian/console-conf.serial-console-conf@.service +++ b/debian/console-conf.serial-console-conf@.service @@ -8,7 +8,7 @@ ConditionPathExists=!/var/lib/console-conf/complete [Service] Environment=PYTHONPATH=/usr/share/subiquity ExecStartPre=/bin/systemctl stop serial-getty@%I -ExecStart=-/sbin/agetty -n --noclear -l /usr/bin/console-conf %I $TERM +ExecStart=-/sbin/agetty -n --noclear -l /usr/bin/console-conf-wrapper %I $TERM ExecStop=/bin/systemctl start serial-getty@%I Type=idle Restart=always