[OpenWrt-Devel] Build ipk and make autostart?

Nguyễn Hồng Quân ng.hong.quan at gmail.com
Sat Sep 13 04:53:57 EDT 2014


Hi Jiří,

My init script (puppysplash) is already executable as shown below

root at OpenWrt:~# ls -l /etc/init.d/
-rwxr-xr-x    1 root     root          1419 Apr 16 17:32 boot
-rwxr-xr-x    1 root     root           729 Sep 13 07:07 cron
-rwxr-xr-x    1 root     root           330 Dec 12  2013 defconfig
-rwxr-xr-x    1 root     root         13785 Sep 13 07:08 dnsmasq
-rwxr-xr-x    1 root     root           252 Apr 16 17:32 done
-rwxr-xr-x    1 root     root          4139 Sep 13 07:07 dropbear
-rwxr-xr-x    1 root     root          1022 Sep 13 07:08 firewall
-rwxr-xr-x    1 root     root          2015 Dec 12  2013 led
-rwxr-xr-x    1 root     root          2119 Sep 13 07:07 log
-rwxr-xr-x    1 root     root           835 Apr 16 17:33 luci_dhcp_migrate
-rwxr-xr-x    1 root     root           368 Sep 13 08:47 luci_fixtime
-rwxr-xr-x    1 root     root          2912 Apr 16 17:32 network
-rwxr-xr-x    1 root     root           244 Sep 13 07:07 odhcpd
-rwxr-xr-x    1 root     root           254 Sep 13 08:44 puppysplash
-rwxr-xr-x    1 root     root           125 Dec 12  2013 sysctl
-rwxr-xr-x    1 root     root           309 Apr 16 17:32 sysfixtime
-rwxr-xr-x    1 root     root           716 Sep 13 07:07 sysntpd
-rwxr-xr-x    1 root     root          1037 Apr 16 17:32 system
-rwxr-xr-x    1 root     root           926 Sep 13 07:07 telnet
-rwxr-xr-x    1 root     root          3411 Sep 13 07:07 uhttpd
-rwxr-xr-x    1 root     root           106 Apr 16 17:32 umount

But it doesn't start automatically.

On Sat, Sep 13, 2014 at 3:28 PM, Jiří Šlachta <slachta at cesnet.cz> wrote:

> Hi,
>
> there is no need to enable the init script in postinst. The only
> thing you need to make it start automatically is to give the executable
> bit to the init script.
>
> See below:
>
> define Package/package/install
>         $(INSTALL_DIR) $(1)/etc/init.d
>         $(INSTALL_BIN) ./files/package.init $(1)/etc/init.d/package
> endef
>

-- 
***********************************************
* Nguyễn Hồng Quân                            *
* Y!M: ng_hquan_vn                            *
* Facebook: ng.hong.quan                      *
* Web: quan.hoabinh.vn                        *
***********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140913/8044b8f5/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list