How can we add new openwrt service with QuecOpen

Hi,

I am developing new services based on QuecOpen. In general, these services will be called on bootup the system. However, it’s not called after trying many way and many different Start, stop levels.

More details for my way:

  • Add file to /etc/init.d/hello.init that calls a simple script (already in mod 755)
  • /etc/init.d/hello.init start
  • /etc/init.d/hello.init enable
  • reboot the system

After rebooting, check the status or the output of the script, I can confirm that it’s not started any time yet.
I can see other services introduced by Quectel are starting in the logs below

[   66.951615] /etc/init.d/start_quectel_slic_daemon start
...
[   89.771328] Try to start wlan_services based on procd
[   90.501159] qmi_shutdown_modem service start
[   95.740843] process_accept_req: 30 callbacks suppressed

So, for developing a new service with QuecOpen is there any special step to add these new services into the bootup process?

BR
meqqn

Hi,meqqn
can you tell me the model of the module you are currently using?
If you want to add some services to make it call when the system starts.
Try the following steps

  1. Add a file to /etc/init.d/
  2. Create a soft link to the file you added in /etc/rcX.d/(usually rc5.d), it is best to use an absolute path here (otherwise it may not work).
    3.sync and reboot

Thanks, Leon.Bao,

The module we are using is RG255C_Series_5G coming alone with sdx35 code.

I have made similar changes as your suggestion before but not work, the folder is /etc/rc.d instead of /etc/rcX.d as yours. I have 5 new services and they are having the same problem as this.

The symbol links will be created when we call /etc/init.d/<servicename> enable

# ls -la |grep remount
-rwxr-xr-x    1 root     root           858 Nov 11 01:41 remount_rootfs

# ls -la |grep rc
-rw-r--r--    1 root     root           132 Jan 23  2023 bash.bashrc
drwxrwxr-x    2 root     root           488 Jul 25 13:15 rc.button
-rwxrwxr-x    1 root     root          3552 Jul 25 13:15 rc.common
drwxr-xr-x    1 root     root          1080 Nov 11 23:36 rc.d
-rwxrwxr-x    1 root     root           132 Jul 25 13:15 rc.local
-rwxrwxr-x    1 root     root         11641 Jul 25 13:15 resourcemanager.xml

# ls -la|grep remount
lrwxrwxrwx    1 root     root            24 Nov 11 23:08 K01remount_rootfs -> ../init.d/remount_rootfs
lrwxrwxrwx    1 root     root            24 Nov 11 23:08 S91remount_rootfs -> ../init.d/remount_rootfs

I could other services have the links in the /etc/rc.d/folder as in the example below

lrwxrwxrwx    1 root     root            33 Jul 25 13:15 S96ql-remotefs-daemon.init -> ../init.d/ql-remotefs-daemon.init
lrwxrwxrwx    1 root     root            29 Jul 25 13:15 S96quectel-daemon.init -> ../init.d/quectel-daemon.init
lrwxrwxrwx    1 root     root            28 Jul 25 13:15 S97MCM_atcop_svc.init -> ../init.d/MCM_atcop_svc.init
lrwxrwxrwx    1 root     root            30 Jul 25 13:15 S97ethernet-config.init -> ../init.d/ethernet-config.init
lrwxrwxrwx    1 root     root            29 Jul 25 13:15 S97ql_ril_service.init -> ../init.d/ql_ril_service.init
lrwxrwxrwx    1 root     root            37 Jul 25 13:15 S97quectel-monitor-daemon.init -> ../init.d/quectel-monitor-daemon.init
lrwxrwxrwx    1 root     root            23 Jul 25 13:15 S98postboot.init -> ../init.d/postboot.init
lrwxrwxrwx    1 root     root            26 Jul 25 13:15 S98qdss_config.init -> ../init.d/qdss_config.init
lrwxrwxrwx    1 root     root            32 Jul 25 13:15 S98subsystem-ramdump.init -> ../init.d/subsystem-ramdump.init
lrwxrwxrwx    1 root     root            17 Jul 25 13:15 S98sysntpd -> ../init.d/sysntpd
lrwxrwxrwx    1 root     root            28 Jul 25 13:15 S98wlan_services.init -> ../init.d/wlan_services.init
lrwxrwxrwx    1 root     root            32 Jul 25 13:15 S99powerstateservice.init -> ../init.d/powerstateservice.init
lrwxrwxrwx    1 root     root            33 Jul 25 13:15 S99qmi_shutdown_modem.init -> ../init.d/qmi_shutdown_modem.init
lrwxrwxrwx    1 root     root            22 Jul 25 13:15 S99urandom_seed -> ../init.d/urandom_seed

BR
Meqqn

@meqqn
Change the …/init.d/xxx to /etc/init.d/xxx ,Do not use…/
image

Use /etc/init.d/ instead of …/init.d/ but not working. I have tried your simple script also but it seems not trigger on boot up.

For now, all new added services are not triggered :frowning:

@meqqn wish the guide can help you