[OpenWrt-Devel] Build ipk and make autostart?
Jiří Šlachta
slachta at cesnet.cz
Sat Sep 13 03:28:44 EDT 2014
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
Jiri
Dne 13/09/2014 v 08:59 Gerald Matzka napsal(a):
>
>
> Am 13.09.2014 um 08:48 schrieb Nguyễn Hồng Quân <ng.hong.quan at gmail.com <mailto:ng.hong.quan at gmail.com>>:
>
>> 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?
>>
>
> Take a look at http://wiki.openwrt.org/doc/devel/packages - section Package/postinst.
> Seems you forgot the #!/bin/sh
>
> Kind regards, GM
>
>> Thanks
>>
>> --
>> ***********************************************
>> * Nguyễn Hồng Quân *
>> * Y!M: ng_hquan_vn *
>> * Facebook: ng.hong.quan *
>> * Web: quan.hoabinh.vn <http://quan.hoabinh.vn> *
>> ***********************************************
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
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