В Wed, 27 Mar 2013 08:40:00 -0500 "David A. Marlin" <[email protected]> пишет:
> > moving to the mailing list: > > On 03/26/2013 09:04 PM, Lennart Poettering wrote: > > > On 26.03.2013 19:21, David Marlin wrote: > >> > >> I am trying to make the serial console automatically log in a user on > >> boot. I tried modifying: > >> > >> /lib/systemd/system/[email protected] > > > > /lib/ is package manager territory, you should never edit files there, > > the package manager will otherwise override your changes without hehow > > to correct thissitation. > > > > Instead, copy /lib/systemd/system/[email protected] to > > /etc/systemd/system/[email protected] -- /etc is administrator > > territory, and unit files stored there will automatically override > > unit files by the same name in /lib. > > I had actually tried this (or several variations on this), but it was > not producing the desired results. > > I tried again using exactly what you suggested. For this example, I > just used 'root' user for testing. Below are snippets of the steps I > performed: > > -------------------------------------------------------------------------- > cp /lib/systemd/system/[email protected] > /etc/systemd/system/[email protected] > > vi /etc/systemd/system/[email protected] > > diff -u /lib/systemd/system/[email protected] > /etc/systemd/system/[email protected] > ----------- > [Service] > -ExecStart=-/sbin/agetty -s %I 115200,38400,9600 vt102 > +ExecStart=-/sbin/agetty -s --noclear --autologin root %I > 115200,38400,9600 vt102 > ----------- > > [root@localhost ~]# systemctl daemon-reload > [root@localhost ~]# exit > logout > > Fedora release 18 (Spherical Cow) > Kernel 3.6.10-8.fc18.armv7hl.tegra on an armv7l (ttyS0) > > localhost login: > > ( note: still prompts for login ) > > [root@localhost ~]# reboot > : > > Fedora release 18 (Spherical Cow) > Kernel 3.6.10-8.fc18.armv7hl.tegra on an armv7l (ttyS0) > > localhost login: > > ( note: again, after reboot, prompts for login ) > [email protected] is used only as template, and it looks like getty-generator always links to (/usr)/lib/systemd: from = strappend(SYSTEM_DATA_UNIT_PATH "/", fservice); to = strjoin(arg_dest,"/getty.target.wants/", tservice, NULL); It probably should use real unit path for fservice. > [root@localhost ~]# cp /etc/systemd/system/[email protected] > /lib/systemd/system/[email protected] > > [root@localhost ~]# systemctl daemon-reload > [root@localhost ~]# exit > logout > > Fedora release 18 (Spherical Cow) > Kernel 3.6.10-8.fc18.armv7hl.tegra on an armv7l (ttyS0) > > localhost login: root (automatic login) > > ( note: works as expected, autologin ) > > [root@localhost ~]# reboot > : > > Fedora release 18 (Spherical Cow) > Kernel 3.6.10-8.fc18.armv7hl.tegra on an armv7l (ttyS0) > > localhost login: root (automatic login) > > ( note: works as expected, autologin. > also, note that the change is persistent; survives reboot. ) > > -------------------------------------------------------------------------- > > So if I make the change only in /etc it does not seem to work. If I > make the change only in /lib it works, but does not survive reboot. If I > make the change in both, it works and survives reboot. > > I assume I am making some mistake in the process, but it is not obvious > to me what I'm doing wrong. > > This is a headless system, so I only have a serial console for access. > I do pass "console=ttyS0,115200n8" on the kernel command line. I am > running systemd-195-15.fc18. > > Please let me know what I'm missing. > > > Thank you, > > d.marlin > ========= > > > > > Also see: > > > > http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions > > > > Question #4 on that list. > > > > Lennart > > _______________________________________________ > systemd-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/systemd-devel _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
