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}