Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Matthias Hanft
Dale wrote:
> 
> Correct.  I should have mentioned that in my post but assumed it would
> be known.  Anytime agetty is killed, it just pops back up.  I suspect it
> doesn't stay dead for even a second.  Sort of like those zombie movies. 

Looks good.  I used "pkill agetty", and now it looks like

root 16153 1  0 17:01 tty6 00:00:00 /sbin/agetty 38400 tty6 linux
root 16155 1  0 17:01 tty1 00:00:00 /sbin/agetty 38400 tty1 linux
root 16156 1  0 17:01 tty2 00:00:00 /sbin/agetty 38400 tty2 linux
root 16157 1  0 17:01 tty3 00:00:00 /sbin/agetty 38400 tty3 linux
root 16158 1  0 17:01 tty4 00:00:00 /sbin/agetty 38400 tty4 linux
root 16159 1  0 17:01 tty5 00:00:00 /sbin/agetty 38400 tty5 linux

and lsof... (or lib_users) doesn't show anything any more.  Thank you!

-Matt




Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread John Covici
On Sat, 12 Aug 2017 07:51:46 -0400,
Rich Freeman wrote:
> 
> On Sat, Aug 12, 2017 at 4:22 AM, Matthias Hanft  wrote:
> > Dale wrote:
> >>
> >> I do it this way.
> >> pkill agetty
> >> Simple, quick and easy to remember.  One could script it I guess???
> >
> > I'm pretty sure this would work, but is there something which would
> > start them again?  As far as I understand, these are the processes
> > that provide console login - correct?  Normally, I log in using ssh
> > via network, but I would be a little upset if I couldn't log in at
> > the console any more...
> >
> 
> Agetty is started by init, so it will be restarted if it dies.
> sysvinit does all of about 3 things in total, and this is one of them.

Would not you have to do this for each device, so maybe killall agetty
or some such?

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.com



Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Dale
Rich Freeman wrote:
> On Sat, Aug 12, 2017 at 4:22 AM, Matthias Hanft  wrote:
>> Dale wrote:
>>> I do it this way.
>>> pkill agetty
>>> Simple, quick and easy to remember.  One could script it I guess???
>> I'm pretty sure this would work, but is there something which would
>> start them again?  As far as I understand, these are the processes
>> that provide console login - correct?  Normally, I log in using ssh
>> via network, but I would be a little upset if I couldn't log in at
>> the console any more...
>>
> Agetty is started by init, so it will be restarted if it dies.
> sysvinit does all of about 3 things in total, and this is one of them.
>

Correct.  I should have mentioned that in my post but assumed it would
be known.  Anytime agetty is killed, it just pops back up.  I suspect it
doesn't stay dead for even a second.  Sort of like those zombie movies. 
lol 

Dale

:-)  :-) 



Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Rich Freeman
On Sat, Aug 12, 2017 at 4:22 AM, Matthias Hanft  wrote:
> Dale wrote:
>>
>> I do it this way.
>> pkill agetty
>> Simple, quick and easy to remember.  One could script it I guess???
>
> I'm pretty sure this would work, but is there something which would
> start them again?  As far as I understand, these are the processes
> that provide console login - correct?  Normally, I log in using ssh
> via network, but I would be a little upset if I couldn't log in at
> the console any more...
>

Agetty is started by init, so it will be restarted if it dies.
sysvinit does all of about 3 things in total, and this is one of them.

-- 
Rich



Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Matthias Hanft
Dale wrote:
> 
> I do it this way.
> pkill agetty
> Simple, quick and easy to remember.  One could script it I guess??? 

I'm pretty sure this would work, but is there something which would
start them again?  As far as I understand, these are the processes
that provide console login - correct?  Normally, I log in using ssh
via network, but I would be a little upset if I couldn't log in at
the console any more...

-Matt




Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Rich Freeman
On Sat, Aug 12, 2017 at 3:35 AM, Matthias Hanft  wrote:
>
> But now, there's agetty left, and I don't know how to restart this
> service (without reboot):
>

This is because these are run directly by init and not by openrc,
unlike all the other daemons on the system.  As others pointed out you
can just kill these directly.

Under systemd agetty is run as a service just like everything else and
you can restart it the same way that you'd restart apache.  There
isn't really any equivalent to inittab in systemd other than one or
two similar global settings.

Arguably it might be nicer to treat them more like a normal service
under openrc, now that it can restart crashed services.  I'm not sure
how reliable this feature is (I haven't run openrc in a while now),
and you would need it to be reliable for agetty since most people like
having a console.  Traditionally agetty has been run by init for a
long time though, so there might be some reluctance to make this
change.  Offhand I'm not sure if there are any other issues with
making it a service in openrc.

Fun fact: sysvinit is essentially a poor man's service manager.  You
could stick anything in inittab and init will start it, and restart it
if it dies.  There is just no control over things like dependencies
and sequencing, and you have to watch out because if you have init run
some bash script, which launches a process that forks, and your script
terminates, then init will re-launch it possibly giving you a fork
bomb at boot.  Things like this are why more full-featured service
managers were created.  Even these tend to fall in generations, with
openrc being a lot more modern than what most distros were using
before upstart/runit/systemd came along.

-- 
Rich



Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Dale
Matthias Hanft wrote:
> Hi,
>
> for weekly updates, I'm using the usual update commands, such as
>
> emerge -NDuv @world
> emerge -c
> revdep-rebuild -i
>
> In order to find out which services are still using old versions
> of updated programs/libraries, I add
>
> lsof | grep -w DEL | grep portage
>
> and /etc/init.d/XXX restart for those services.
>
> But now, there's agetty left, and I don't know how to restart this
> service (without reboot):
>
> [...]
> agetty 3438root  DEL   REG8,4   
> 30199325219 
> /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnss_files-2.23.so
> agetty 3438root  DEL   REG8,4   
> 30199325229 
> /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnss_nis-2.23.so
> agetty 3438root  DEL   REG8,4   
> 30199325233 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnsl-2.23.so
> agetty 3438root  DEL   REG8,4   
> 30199325236 
> /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnss_compat-2.23.so
> agetty 3438root  DEL   REG8,4   
> 30199325238 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libc-2.23.so
> agetty 3438root  DEL   REG8,4   
> 30199325230 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/ld-2.23.so
> [...]
>
> There is a /etc/init.d/agetty service, but it's stopped anyway.
> I already found some discussions in the net which stated that
> "init q" should do the job, but this doesn't work here (just
> nothing happens).
>
> Is there a way to restart agetty and finally drop those old
> libraries?
>
> Thanks,
>
> -Matt
>
>

I do it this way.

pkill agetty

Simple, quick and easy to remember.  One could script it I guess??? 

Dale

:-)  :-) 



Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Adam Carter
Logout and login again?


Re: [gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Ian Bloss
Running kill on the current pids?

On Sat, Aug 12, 2017, 12:36 AM Matthias Hanft  wrote:

> Hi,
>
> for weekly updates, I'm using the usual update commands, such as
>
> emerge -NDuv @world
> emerge -c
> revdep-rebuild -i
>
> In order to find out which services are still using old versions
> of updated programs/libraries, I add
>
> lsof | grep -w DEL | grep portage
>
> and /etc/init.d/XXX restart for those services.
>
> But now, there's agetty left, and I don't know how to restart this
> service (without reboot):
>
> [...]
> agetty 3438root  DEL   REG8,4
>  30199325219 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/
> libnss_files-2.23.so
> agetty 3438root  DEL   REG8,4
>  30199325229 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/
> libnss_nis-2.23.so
> agetty 3438root  DEL   REG8,4
>  30199325233 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/
> libnsl-2.23.so
> agetty 3438root  DEL   REG8,4
>  30199325236 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/
> libnss_compat-2.23.so
> agetty 3438root  DEL   REG8,4
>  30199325238 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/
> libc-2.23.so
> agetty 3438root  DEL   REG8,4
>  30199325230 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/
> ld-2.23.so
> [...]
>
> There is a /etc/init.d/agetty service, but it's stopped anyway.
> I already found some discussions in the net which stated that
> "init q" should do the job, but this doesn't work here (just
> nothing happens).
>
> Is there a way to restart agetty and finally drop those old
> libraries?
>
> Thanks,
>
> -Matt
>
>


[gentoo-user] Restart agetty after update @world?

2017-08-12 Thread Matthias Hanft
Hi,

for weekly updates, I'm using the usual update commands, such as

emerge -NDuv @world
emerge -c
revdep-rebuild -i

In order to find out which services are still using old versions
of updated programs/libraries, I add

lsof | grep -w DEL | grep portage

and /etc/init.d/XXX restart for those services.

But now, there's agetty left, and I don't know how to restart this
service (without reboot):

[...]
agetty 3438root  DEL   REG8,4   
30199325219 
/var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnss_files-2.23.so
agetty 3438root  DEL   REG8,4   
30199325229 
/var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnss_nis-2.23.so
agetty 3438root  DEL   REG8,4   
30199325233 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnsl-2.23.so
agetty 3438root  DEL   REG8,4   
30199325236 
/var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libnss_compat-2.23.so
agetty 3438root  DEL   REG8,4   
30199325238 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/libc-2.23.so
agetty 3438root  DEL   REG8,4   
30199325230 /var/tmp/portage/sys-libs/glibc-2.23-r4/image/lib64/ld-2.23.so
[...]

There is a /etc/init.d/agetty service, but it's stopped anyway.
I already found some discussions in the net which stated that
"init q" should do the job, but this doesn't work here (just
nothing happens).

Is there a way to restart agetty and finally drop those old
libraries?

Thanks,

-Matt