My symlink from /etc/init.d to /etc/rc.d never gets created for my new package

Hi,

I'm trying to create a new package. It's a simple little project, it just installs a .py script and an rc.d file.

Reading through the docs, I see that the post install process for the package SHOULD run "/etc/init.d/mything enable" which SHOULD create a symlink in /etc/rc.d based on the START value I give in the init script.

But that link never gets created, no matter what i try. I don't see any errors, I just don't get that link.

If I run the 'enable' command manually on my router, it works fine. And the package components all get installed fine, and in the right places.

Any suggestions? I've made sure to +x my init script, btw.

And I do see my postinst get run during the build...

INFO:Running postinst of blah-logger

I've tried following this doc for help, but no joy yet:

Thanks,
jason

Here's my Package Makefile...

include $(TOPDIR)/rules.mk

PKG_NAME:=blah-logger
PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_SOURCE_DATE:=2021-06-22


include $(INCLUDE_DIR)/package.mk

define Package/blah-logger
  PKGARCH:=all
  DEPENDS:=
  SECTION:=blahblah
  TITLE:=blah-logger
  CATEGORY:=Network
  URL:=http://www.blahblah.com
endef

define Package/blah-logger/description
  This package will install a utility to collect and send interesting MQTT logs
endef

define Build/Compile
  true
endef

# USE TABS HERE
define Package/blah-logger/install
        $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/blah

        $(INSTALL_BIN) ./files/blah-logger.init $(1)/etc/init.d/blah-logger
        $(INSTALL_BIN) ./files/blah-logger.py $(1)/etc/blah
endef

$(eval $(call BuildPackage,blah-logger))

And here's my rc.d script (blah-logger.init)

#!/bin/sh /etc/rc.common

# Start this after Mosquitto
START=94
USE_PROCD=1

start_service() {
    procd_open_instance
    procd_set_param command /usr/bin/python3 /etc/blah/blah-logger.py
    procd_close_instance
}
1 Like

Same problem with me : Night LED timer for wifi router for OpenWrt - #98 by purple-shed