From owner-freebsd-current Wed Dec 15 15:36:51 1999 Delivered-To: freebsd-current@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 9F65E153F3 for ; Wed, 15 Dec 1999 15:36:47 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40329>; Thu, 16 Dec 1999 10:28:04 +1100 Content-return: prohibited Date: Thu, 16 Dec 1999 10:36:27 +1100 From: Peter Jeremy Subject: Re: MAKEDEV (Re: Speaking of moving files (Re: make world broken building fortunes ) ) In-reply-to: <12873.945299269@critter.freebsd.dk>; from phk@critter.freebsd.dk on Thu, Dec 16, 1999 at 10:07:49AM +1100 To: Poul-Henning Kamp Cc: current@FreeBSD.ORG Message-Id: <99Dec16.102804est.40329@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: <99Dec16.095420est.40348@border.alcanet.com.au> <12873.945299269@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 1999-Dec-16 10:07:49 +1100, Poul-Henning Kamp 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