Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Dec 1999 10:36:27 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        current@FreeBSD.ORG
Subject:   Re: MAKEDEV (Re: Speaking of moving files (Re: make world broken building fortunes ) )
Message-ID:  <99Dec16.102804est.40329@border.alcanet.com.au>
In-Reply-To: <12873.945299269@critter.freebsd.dk>; from phk@critter.freebsd.dk on Thu, Dec 16, 1999 at 10:07:49AM %2B1100
References:  <99Dec16.095420est.40348@border.alcanet.com.au> <12873.945299269@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1999-Dec-16 10:07:49 +1100, Poul-Henning Kamp <phk@critter.freebsd.dk> wrote:
>In message <99Dec16.095420est.40348@border.alcanet.com.au>, Peter Jeremy writes
>:
>>It can do that now.  Add the following lines to /etc/ttys:
>>
>>sshd	"/usr/local/sbin/sshd" none on
>>inetd	"/usr/sbin/inetd -Ww" none on
>>syslogd	"/usr/sbin/syslogd" none on
>>
>>(This ability has always been present, but is now documented).
>
>Yes, but apart from the highly unintuitive name "/etc/ttys"

I agree that it's non-intuitive, but I doubt that any attempt to
change the name would survive very long.

>I would prefer if the lines could be added to /etc/ttys somewhat
>like:
>	sshd "/usr/local/sbin/sshd" none ondemand
>
>And then we could
>	telinit -on sshd
>	telinit -off sshd

This looks nice.  The major problem I see is coming up with a secure
mechanism for passing the daemon name from telinit to init.  (And the
issue of whether the state should be persistent over reboots - which
is regularly hashed to death whenever DEVFS comes up).

And, whilst it's even less intuitive than /etc/ttys, we already have
equivalent functionality now (assuming you have an entry in /dev for
a non-existent device).  The state in /etc/ttys always is `on'.

Using sshd as an example:

To enable:
	rm -f /dev/sshd
	kill -HUP 1

To disable:
	ln -s /dev/some_device_that_isnt_configured /dev/sshd
	kill -HUP 1

(This works because init will always try to open /dev/sshd.  If
the open returns ENXIO, it will skip that line.  If the open
succeeds, or fails with any other error (ie ENOENT) the line
is accepted).

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Dec16.102804est.40329>