[13/13] gerbera: Add rc symlinks for autostart on boot
Commit Message
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
config/rootfiles/packages/gerbera | 3 +++
lfs/gerbera | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
Comments
Hello Stefan,
thank you for the series. Overall the idea is good and the libraries can stay
the way they are (patches 1 to 5 as separate commits are fine), but the gerbera
part reads like a log of your work and not like a finished change:
* Patches 6 to 13 should be a single commit "gerbera: New package"
with the final version (3.3.0), the config file, the initscript, the
symlinks, and the backup definition.
* Patch 11 should be part of patch 1.
That way, every commit builds and works, nobody has to bisect through the
state where the package has no initscript, and the history stays easy to
review. "git rebase -i" with fixup is the easiest way to do this.
> + ln -svf /etc/rc.d/init.d/gerbera /etc/rc.d/rc3.d/S70gerbera
> + ln -svf /etc/rc.d/init.d/gerbera /etc/rc.d/rc0.d/K01gerbera
> + ln -svf /etc/rc.d/init.d/gerbera /etc/rc.d/rc6.d/K01gerbera
Is autostart on boot something we want for a new add-on? Minidlna does not
do that by default, and since this opens a web interface (with a default
password, see patch 7) I would rather leave the decision to the user. If you
want it, you could add S70 and K01 with a number that does not clash with
another service.
Could you please send a v2 with the things that I have mentioned in the
replies? Please also let us know on which system you tested this and if you
could use the web interface from green.
-Michael
@@ -1,6 +1,9 @@
#etc/gerbera
etc/gerbera/config.xml
etc/rc.d/init.d/gerbera
+etc/rc.d/rc0.d/K01gerbera
+etc/rc.d/rc3.d/S70gerbera
+etc/rc.d/rc6.d/K01gerbera
usr/bin/gerbera
#usr/share/bash-completion/completions/gerbera
#usr/share/gerbera
@@ -115,10 +115,15 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
mkdir -pv /var/lib/gerbera
chown nobody:nobody /var/lib/gerbera
- #install initscripts
+ # Install initscripts
$(call INSTALL_INITSCRIPTS,$(SERVICES))
- #install backup definition
+ # Create symlinks for runlevel interaction.
+ ln -svf /etc/rc.d/init.d/gerbera /etc/rc.d/rc3.d/S70gerbera
+ ln -svf /etc/rc.d/init.d/gerbera /etc/rc.d/rc0.d/K01gerbera
+ ln -svf /etc/rc.d/init.d/gerbera /etc/rc.d/rc6.d/K01gerbera
+
+ # Install backup definition
install -v -m 644 ${DIR_SRC}/config/backup/includes/gerbera \
/var/ipfire/backup/addons/includes/gerbera