Bug#754423: adapting rc.local that needs interaction to systemd
積丹尼 Dan Jacobson
jidanni at jidanni.org
Sat Jul 12 01:57:32 BST 2014
OK what anybody used to do in /etc/rc.local can all be now often also be
done instead via making a non-symlinked
/etc/systemd/system/getty.target.wants/getty at tty1.service and changing
# ExecStart=-/sbin/agetty --noclear %I
ExecStart=-/sbin/agetty --noclear --autologin root %I
# Restart=always
Restart=no
And then at top of root's .bash_profile put
r=my.rc.local
t=/tmp/.ran.$r
if ! test -f $t
then sh $r && touch $t && kill -1 $PPID
fi
Then one doesn't need to learn any new protocols!
My only regret is this leaves a dead tty1.
I would like instead to leave what looks like a login: prompt there on
tty1, just like one sees now on tty2 etc.
That is I need a way to write something like
ExecStartFirstTime =-/sbin/agetty --noclear --autologin root %I
ExecStartAllRestTimes=-/sbin/agetty --noclear %I
Restart=always
It is not clear on man systemd.service how to do that!
More information about the Pkg-systemd-maintainers
mailing list