From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/720 Path: main.gmane.org!not-for-mail From: Vincent Danen Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Can't run mingetty with runsvdir? Date: Sun, 20 Feb 2005 13:56:54 -0700 Message-ID: <60187e8f86cda4fcfc0da25de5361f85@annvix.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-2--370688051" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1108932842 21515 80.91.229.2 (20 Feb 2005 20:54:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2005 20:54:02 +0000 (UTC) Cc: supervision@list.skarnet.org Original-X-From: supervision-return-959-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Feb 20 21:54:02 2005 Original-Received: from antah.skarnet.org ([212.85.147.14] ident=qmailr) by ciao.gmane.org with smtp (Exim 4.43) id 1D2y5E-0004yG-HR for gcsg-supervision@gmane.org; Sun, 20 Feb 2005 21:53:40 +0100 Original-Received: (qmail 885 invoked by uid 76); 20 Feb 2005 20:57:20 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 879 invoked from network); 20 Feb 2005 20:57:20 -0000 In-Reply-To: Original-To: lars@oddbit.com X-Pgp-Agent: GPGMail 1.0.2 X-Mailer: Apple Mail (2.619.2) X-SA-Exim-Connect-IP: 68.149.32.85 X-SA-Exim-Mail-From: vdanen@annvix.org X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on hades.annvix.org X-Spam-Level: X-Spam-Status: No, hits=-2.9 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=2.64 X-SA-Exim-Version: 4.1 (built Wed, 02 Feb 2005 21:38:53 -0500) X-SA-Exim-Scanned: Yes (on hades.annvix.org) X-MailScanner-To: gcsg-supervision@gmane.org Xref: main.gmane.org gmane.comp.sysutils.supervision.general:720 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:720 --Apple-Mail-2--370688051 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Feb 20, 2005, at 11:21, Lars Kellogg-Stedman wrote: > I'm trying to replace the mingetty calls in /etc/inittab with > runit-controlled services. The inittab entries look like this: > > 1:2345:respawn:/sbin/mingetty tty1 > > I've create a run script for runsv that looks like this: > > #!/bin/sh > exec mingetty tty1 > > Unfortunately, this fails with the following error logged in syslog: > > auth.err: Feb 20 12:44:42 mingetty[5609]: tty1: no controlling tty: > Operation not permitted > > Using strace shows that the "Operating not permitted" error is due to a > failed ioctl() call. > > ioctl(3, TIOCSCTTY) = -1 EPERM (Operation not permitted) > > According to what little documentation I can find out there, TIOCSCTTY > returns EPERM "If this tty is already the controlling tty of a > different > session group." But nothing else has tty1 open. > > I'm running this service via runsvdir, which itself is started from > /etc/inittab via the following: > > ri:2345:respawn:/sbin/runsvdir /etc/runit/active-services > > This is all happening in a Linux 2.6 environment. Anyone have this > working? I replaced mingetty with agetty for the time being, which > appears > to work, but I'm curious what's making mingetty choke. This is what I'm using here and it works great: [vdanen@titan vdanen]$ cat /service/mingetty-tty1/run #!/bin/sh chpst -P /sbin/mingetty --noclear tty1 However, note that I don't use init at all (I suspect you'll need to completely remove those mingetty lines from inittab). I use runit as init. I have 6 tty's setup this way (only tty1 has the --noclear option just so we don't wipe out boot information). Hope that helps a bit. FWIW, the Annvix CVS repository has a lot of run scripts tucked away for services that, for the most part (with openldap being somewhat problematic) work great for a number of serivces we use. Anyone is free to poke through the CVS for our runscripts. http://annvix.org/cgi-bin/viewcvs.cgi/packages/ All daemons are run under supervise except for autofs (still need to get around to that or switch to amd). Could be useful to some folks (I know someone was having issues with nfs on the list... if they go to the CVS and look in the nfs-utils package, they can see the two runscripts we use to handle nfs services which seem to work pretty good over here). -- Annvix - Secure Linux Server: http://annvix.org/ "lynx -source http://linsec.ca/vdanen.asc | gpg --import" {FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4} --Apple-Mail-2--370688051 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFCGPmWLrxeMv7jCtQRApQFAKCTXEo7Xr/O3ww3Ow7m7/hONL+ZbACfSmjD 54jIlvK9l2QR9PKtjM6CATY= =NoP9 -----END PGP SIGNATURE----- --Apple-Mail-2--370688051--