Koozali.org: home of the SME Server

Contribs.org Forums => Koozali SME Server 10.x => Topic started by: mauro on August 20, 2021, 10:06:47 AM

Title: templated rc.local
Post by: mauro on August 20, 2021, 10:06:47 AM
Hi guys
in SME9 I had a custom template for /etc/rc.d/rc.local.
I see that in SME10 this template does not get expanded, unless I do it manually.
Is it supposed to be like that, because I should move it to some magical systemd thing, or is it a bug?
Title: Re: templated rc.local
Post by: brianr on August 20, 2021, 10:26:57 AM
What was it you were trying to do with the templated rc.local?
Title: Re: templated rc.local
Post by: mauro on August 20, 2021, 10:41:34 AM
The files .procmailrc and .vacation.aliases get overwritten with some custom stuff for some of the users.
I know this is crude but at that time I was not able to do a custom template for just some of the users and this quick and dirty solution has worked for the past 10 years or so.
Title: Re: templated rc.local
Post by: ReetP on August 20, 2021, 11:15:18 AM
Probably want to look at the correct templates for the correct files.

Check the contrib, and make your custom templates from there, which will make sure they get expanded at the right time.
Title: Re: templated rc.local
Post by: mauro on August 20, 2021, 11:20:24 AM
Sure, I agree it's about time to address those changes in the proper way.
But my original question still stands: rc.local is not expanded, is it intended behavior or should I open a bug report?
Title: Re: templated rc.local
Post by: brianr on August 20, 2021, 11:24:17 AM
Sure, I agree it's about time to address those changes in the proper way.
But my original question still stands: rc.local is not expanded, is it intended behavior or should I open a bug report?

I am pretty sure that systemd covers the job that rc.local did in SME9, however opening a bug might elicit some more information about how to do it in systemd.

Post a link to the bug here...
Title: Re: templated rc.local
Post by: brianr on August 20, 2021, 11:27:03 AM
Actually this link might help:

https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/

No idea if it will work under SME10 though - try it and report.
Title: Re: templated rc.local
Post by: sages on August 20, 2021, 11:29:48 AM
Do a google search. I'm pretty certain that rc.local is no more. It's a was rc.local, it is no more......  :lol:
There ya go. https://www.redhat.com/sysadmin/replacing-rclocal-systemd (https://www.redhat.com/sysadmin/replacing-rclocal-systemd) plenty more online about it.
Title: Re: templated rc.local
Post by: mauro on August 20, 2021, 11:35:13 AM
Thanks for the links. I did not know that rc.local was superseded by systemd!
I will not open a bug, I think SME10 is behaving correctly.
Title: Re: templated rc.local
Post by: Jean-Philippe Pialasse on August 20, 2021, 01:05:15 PM
on a based SME 9 there is no /etc/rc.d/rc.local template you could modify your file directly. 


on SME 10 the file exists and there is a rc-local.service to execute it.