[systemd-devel] [PATCH] build-sys: configurable debug shell tty path

Lennart Poettering lennart at poettering.net
Fri Mar 22 19:00:18 PDT 2013


On Thu, 14.03.13 14:58, Umut Tezduyar (umut at tezduyar.com) wrote:

Hmm, do we really want this configurable? I mean, it's a debug shell,
not more...

Generally we have been very conservative with making too many things
configurable here at build-time, since we don't actually want to
encourage people more than necessary to deviate here, for
"bike-shedding"-style questions such as "Which VT is my debug shell
on?".

Anyway, I am not totally opposed, but can you make a good case for it?

(Also, should we merge this, please replace the subst name with
something uppercase. The lowercase bits are only used for paths really,
i guess.)

> ---
>  configure.ac                 |    9 +++++++++
>  units/debug-shell.service.in |    4 ++--
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 28d7286..75bda8a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -742,6 +742,15 @@ AS_IF([test "x$enable_keymap" = "xyes"], [
>  AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
>  
>  # ------------------------------------------------------------------------------
> +debugshell=/dev/tty9
> +AC_ARG_WITH([debugshelltty],
> +        [AS_HELP_STRING([--with-debugshelltty=PATH],
> +                [Specify the tty device for debug shell])],
> +        [debugshell="$withval"],
> +        [])
> +AC_SUBST(debugshell)
> +
> +# ------------------------------------------------------------------------------
>  have_manpages=no
>  AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
>  AS_IF([test "x$enable_manpages" != xno], [
> diff --git a/units/debug-shell.service.in b/units/debug-shell.service.in
> index 2aa98d3..50afb11 100644
> --- a/units/debug-shell.service.in
> +++ b/units/debug-shell.service.in
> @@ -6,7 +6,7 @@
>  #  (at your option) any later version.
>  
>  [Unit]
> -Description=Early root shell on tty9 FOR DEBUGGING ONLY
> +Description=Early root shell on @debugshell@ FOR DEBUGGING ONLY
>  Documentation=man:sushell(8)
>  DefaultDependencies=no
>  IgnoreOnIsolate=yes
> @@ -17,7 +17,7 @@ ExecStart=@sushell@
>  Restart=always
>  RestartSec=0
>  StandardInput=tty
> -TTYPath=/dev/tty9
> +TTYPath=@debugshell@
>  TTYReset=yes
>  TTYVHangup=yes
>  KillMode=process


Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list