As Jiri said, you don't need a postinst function to enable the script. Your script should start with

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

and include the line:

START=xx

Where 'xx' is the startup position number you want your script executed in rc.d (Ex: START=95)

See the example init script near the bottom in: http://wiki.openwrt.org/doc/devel/packages

/ted

-----Original Message----- From: Nguy?n H?ng Qu?n <ng.hong.q...@gmail.com>
To: openwrt-devel@lists.openwrt.org
Subject: [OpenWrt-Devel] Build ipk and make autostart?
Message-ID:
<CAL-RyxgznDD0rkDDgUZxVN_aKJyc9a9Xt9gsuV0y=f7b6oc...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

When I package an application to ipk file, how do I make the application to
automatically start?

I already make the init script, which is supposed to install to /etc/init.d/

I tried add these lines to Makefile

define Package/postinst
   /etc/init.d/puppysplash enable
endef

where "puppysplash" is the name of application. But after building the
OpenWrt image with that application included, I didn't see the symlink in
/etc/rc.d/

So, what is the right way to do?

Thanks

--
***********************************************
* Nguy?n H?ng Qu?n                            *
* Y!M: ng_hquan_vn                            *
* Facebook: ng.hong.quan                      *
* Web: quan.hoabinh.vn                        *
*********************************************** _______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to