supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Vincent Danen <vdanen@annvix.org>
Cc: supervision@list.skarnet.org
Subject: Re: Can't run mingetty with runsvdir?
Date: Sun, 20 Feb 2005 13:56:54 -0700	[thread overview]
Message-ID: <60187e8f86cda4fcfc0da25de5361f85@annvix.org> (raw)
In-Reply-To: <slrnd1hlf3.4bp.lars@flowers.house.oddbit.com>

[-- Attachment #1: Type: text/plain, Size: 2538 bytes --]


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}

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

  reply	other threads:[~2005-02-20 20:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-20 18:21 Lars Kellogg-Stedman
2005-02-20 20:56 ` Vincent Danen [this message]
2005-02-21  1:13   ` Lars Kellogg-Stedman
2005-02-21 17:13     ` Charlie Brady
2005-02-21 17:29       ` Lars Kellogg-Stedman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60187e8f86cda4fcfc0da25de5361f85@annvix.org \
    --to=vdanen@annvix.org \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).