From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egoQ6-0006UL-19 for guix-patches@gnu.org; Wed, 31 Jan 2018 04:11:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egoQ2-0004eG-21 for guix-patches@gnu.org; Wed, 31 Jan 2018 04:11:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1egoQ1-0004dr-Ug for guix-patches@gnu.org; Wed, 31 Jan 2018 04:11:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1egoQ1-0005Au-NE for guix-patches@gnu.org; Wed, 31 Jan 2018 04:11:01 -0500 Subject: [bug#30216] [WIP v5] services: agetty: Make tty optional. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180124131219.14202-1-dannym@scratchpost.org> <20180124133147.15060-1-dannym@scratchpost.org> <87r2q7vzei.fsf@gnu.org> <20180131003018.23bf45d7@scratchpost.org> Date: Wed, 31 Jan 2018 10:09:57 +0100 In-Reply-To: <20180131003018.23bf45d7@scratchpost.org> (Danny Milosavljevic's message of "Wed, 31 Jan 2018 00:30:18 +0100") Message-ID: <87r2q6v1ga.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 30216@debbugs.gnu.org Hey Danny, Danny Milosavljevic skribis: >> I think this would work: >>=20 >> (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 woul= d be > good to have a way to the not start the service after all in that case. What about having =E2=80=98default-serial-port=E2=80=99 return #f in that c= ase, and do something like: #:start #~(let ((tty #$(default-serial-port))) (if tty (make-forkexec-constructor =E2=80=A6) (const #f))) ;never start ? Ludo=E2=80=99.