Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce rc.postlocal executable file... #2447

Merged

Conversation

Baxxy13
Copy link
Contributor

@Baxxy13 Baxxy13 commented Sep 26, 2023

... which can/will be executed at the very end of the boot process in normal-mode and lgw-mode.

Description

Adding the ability to execute a user generated rc.postlocal file which will be executed on the very end of the boot process and also in lgw-mode.

Related Issue

fixes #2338

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Alternate Designs

Possible Drawbacks

Verification Process

Implemented this change on 2 RaspberryMatic Testsystem where on runs in normal-mode and the other in lgw-mode.
Both systems showing no problems and executing the newly rc.postlocal without errors.

Release Notes

Introduce a newly rc.postlocal - file which will be executed at the very end of the boot process in normal-mode and lgw-mode.
Users can e.g. set their own led-beaviour, set own wifi powersafe modes or just send a message when the RM-LGW finished boot.

Contributing checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING and LICENSE document.
  • I fully agree to distribute my changes under Apache 2.0 license.

which can be executed at the very end of the boot process in normal-mode and lgw-mode
@Baxxy13
Copy link
Contributor Author

Baxxy13 commented Sep 26, 2023

Ich weiß, S99SetupLEDs ist nicht der richtige Ort für sowas.
Da du aber in der Vergangenheit gegen neue Sxx init's warst habe ich das einfach mal da reingesetzt.

@jens-maus jens-maus added the 💡 enhancement-ideas New feature or change request label Sep 26, 2023
@jens-maus jens-maus added this to the next release milestone Sep 26, 2023
if anyway both are allowed. in addition, change the priority of the
checks.
@jens-maus jens-maus merged commit 3983746 into jens-maus:master Sep 26, 2023
4 checks passed
@jens-maus
Copy link
Owner

Danke für den PR. Würde nur noch vorschlagen das du die Anleitung (siehe https://github.com/jens-maus/RaspberryMatic/wiki/Experten-Features#eigene-aktionen-w%C3%A4hrend-des-bootvorgangs) dann noch entsprechend anpasst.

@Baxxy13
Copy link
Contributor Author

Baxxy13 commented Sep 26, 2023

Alles klar, das Wiki nehme ich mir für morgen vor.

@Baxxy13 Baxxy13 deleted the introduce-rc.postlocal_executable_file branch September 26, 2023 20:55
@Baxxy13
Copy link
Contributor Author

Baxxy13 commented Sep 27, 2023

Hmm, jetzt haben wir doch beide "falsch gedacht".
Wenn wir im safemode starten wird die /etc/config/safemode im else-Pfad in /etc/init.d/S98StartAddons gelöscht.
Sie existiert also nie wenn /etc/init.d/S99SetupLEDs ausgeführt wird.

else
rm -f /etc/config/safemode
echo "skipping (safemode)"
fi

Die Frage wäre jetzt wie man das am besten angeht da man ja nicht möchte das rc.postlocal im safemode ausgeführt wird.
Vielleicht die safemode in /var ablegen und sie eben in S98StartAddons nicht löschen?

@jens-maus
Copy link
Owner

Hmm, jetzt haben wir doch beide "falsch gedacht".

Stimmt. Aber so ist das eben mit regressions, das passiert genau weil man nicht alle komplexen fälle bedacht hat.

Die Frage wäre jetzt wie man das am besten angeht da man ja nicht möchte das rc.postlocal im safemode ausgeführt wird. Vielleicht die safemode in /var ablegen und sie eben in S98StartAddons nicht löschen?

Ich würde vmtl. einfach das löschen der safemode aus S98StartAddons entfernen und nach S99SetupLEDs verschieben unmittelbar vor das touch /var/status/startupFinished.

@Baxxy13
Copy link
Contributor Author

Baxxy13 commented Sep 27, 2023

Klingt gut und einfach, gucke ich mir dann an.

@Baxxy13 Baxxy13 mentioned this pull request Sep 27, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement-ideas New feature or change request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/usr/local/etc/rc.local not executed in HMLANGW mode
2 participants