running programs before login

Tony Baechler tony at baechler.net
Thu Nov 26 10:20:40 UTC 2015


On 11/25/2015 2:04 PM, Jude DaShiell wrote:
> I think it was on this list someone asked about this since rc.local has gone
> away with the systemd takeover.  I can't answer in all cases since I haven't
> used all shells, but for bash, you can add commands to the end of
> /etc/bash.bashrc and get the same behavior you had putting things in
> rc.local with systemv.  I have it working over here already and I use
> talkingarch linux on this machine and systemd took over long ago here.


Please don't make broad, misleading statements like this.  I know on Debian 
testing for sure that rc.local is still supported as I use it in my live CD 
to play a startup sound.  Systemd has a unit to run it.  The problems with 
putting things in /etc/bash.bashrc are many.  First, what if the user 
logging in doesn't run bash?  Second, what if your system locks up and bash 
doesn't start?  Finally, what if bash is corrupted somehow?  A better way is 
to use rc.local as was done in the past.  If Arch doesn't support this, 
write a unit which runs during boot.  I am not a Systemd expert, but I know 
that you can emulate runlevels and have programs run in a certain order, so 
you could have S99rc.local in /etc/rc?.d to accomplish the same thing.




More information about the Blinux-list mailing list