guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#30216] [WIP v5] services: agetty: Make tty optional.


From: Ludovic Courtès
Subject: [bug#30216] [WIP v5] services: agetty: Make tty optional.
Date: Wed, 31 Jan 2018 10:09:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hey Danny,

Danny Milosavljevic <address@hidden> skribis:

>> I think this would work:
>> 
>>   (let* ((consoles     (find-long-option "console" (linux-command-line)))
>>          (console-ttys (remove (lambda (console)
>>                                  (string-prefix? "tty" console))
>>                                (string-tokenize consoles not-comma))))
>
> "ttyS0" starts with "tty" but should not be removed...
>
>> Maybe default to /dev/ttyS0?
>
> Sounds unsafe.  Also, on x86_64 that's not really useful either.  It would be
> good to have a way to the not start the service after all in that case.

What about having ‘default-serial-port’ return #f in that case, and do
something like:

  #:start #~(let ((tty #$(default-serial-port)))
              (if tty
                  (make-forkexec-constructor …)
                  (const #f)))   ;never start

?

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]