Re: agetty --reload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 March 2015 at 20:12, Karel Zak <kzak@xxxxxxxxxx> wrote:
> On Mon, Mar 09, 2015 at 02:38:23PM +0000, Sitsofe Wheeler wrote:
>>
>> Phew, that was fast! I've found with your patches the first issue is
>> fixed but when waiting at the [press ENTER to login] prompt agetty
>> --reload still has no effect...
>
>  It works for me.
>
>  # grep autologin /etc/systemd/system/getty@.service
>  ExecStart=-/sbin/agetty --autologin kzak --login-pause --noclear %I $TERM
>
>  # echo "Hello world!" >> /etc/issue
>  # agetty --reload
>
>  .. then I see the "Hello..." line before [press ENTER to login].

You're right - I was mistaken and it all works.

Just for the record, the reason I was testing this is because I wanted
agetty to update its display of /etc/issue whenever the networking
changed so IP addresses would be updated. My setup is using networkd
and I have the following systemd units:

/etc/systemd/system/multi-user.target.wants/systemd-networkd-change.path:
[Unit]
Description=Update getty on network changes
DefaultDependencies=no
Requisite=systemd-networkd.service
Before=systemd-networkd.service

[Path]
PathChanged=/run/systemd/netif/state

[Install]
WantedBy=multi-user.target

/etc/systemd/system/systemd-networkd-change.service:
[Unit]
Description=Update getty on network changes
DefaultDependencies=no
Conflicts=shutdown.target

[Service]
Type=oneshot
# sleep is needed if watching the state file because it changes too soon
ExecStartPre=/usr/bin/sleep 0.5s
ExecStart=/usr/local/sbin/agetty --reload

The only snag is that the display goes weird when the console is
blanked and an update happens but that could be a VMware bug.

-- 
Sitsofe | http://sucs.org/~sits/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux