Koozali.org: home of the SME Server

templated rc.local

Offline mauro

  • ****
  • 101
  • +0/-0
templated rc.local
« 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?
All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer.
-- IBM maintenance manual (1975)

Offline brianr

  • *
  • 990
  • +2/-0
Re: templated rc.local
« Reply #1 on: August 20, 2021, 10:26:57 AM »
What was it you were trying to do with the templated rc.local?
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline mauro

  • ****
  • 101
  • +0/-0
Re: templated rc.local
« Reply #2 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.
All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer.
-- IBM maintenance manual (1975)

Offline ReetP

  • *
  • 3,947
  • +6/-0
Re: templated rc.local
« Reply #3 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.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mauro

  • ****
  • 101
  • +0/-0
Re: templated rc.local
« Reply #4 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?
All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer.
-- IBM maintenance manual (1975)

Offline brianr

  • *
  • 990
  • +2/-0
Re: templated rc.local
« Reply #5 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...
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline brianr

  • *
  • 990
  • +2/-0
Re: templated rc.local
« Reply #6 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.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline sages

  • *
  • 190
  • +0/-0
    • http://www.sages.com.au
Re: templated rc.local
« Reply #7 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 plenty more online about it.
...

Offline mauro

  • ****
  • 101
  • +0/-0
Re: templated rc.local
« Reply #8 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.
All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer.
-- IBM maintenance manual (1975)

Offline Jean-Philippe Pialasse

  • *
  • 2,911
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: templated rc.local
« Reply #9 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.