From: Alex Suykov Date: Sat, 23 May 2015 10:06:09 +0000 (+0300) Subject: olsr: systemd support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b39faff8c5d425fe5f9fa64baf4b9ceb77b432f0;p=buildroot.git olsr: systemd support [Thomas: use relative symlink instead of absolute symlink] Signed-off-by: Alex Suykov Signed-off-by: Thomas Petazzoni --- diff --git a/package/olsr/olsr.mk b/package/olsr/olsr.mk index 7e28b1e411..0dec8dc002 100644 --- a/package/olsr/olsr.mk +++ b/package/olsr/olsr.mk @@ -40,4 +40,12 @@ define OLSR_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S50olsr endef +define OLSR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/olsr/olsr.service \ + $(TARGET_DIR)/usr/lib/systemd/system/olsr.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/olsr.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/olsr.service +endef + $(eval $(generic-package)) diff --git a/package/olsr/olsr.service b/package/olsr/olsr.service new file mode 100644 index 0000000000..9ec8930352 --- /dev/null +++ b/package/olsr/olsr.service @@ -0,0 +1,10 @@ +[Unit] +Description=Ad-hoc wireless mesh routing daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/olsrd -nofork +Restart=always + +[Install] +WantedBy=multi-user.target